blob: 5b55111dc6286606994e194acb63fb26979a18e6 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001From 916ea0c70fd063ab7b81f16fd917a75dc02edf4f Mon Sep 17 00:00:00 2001
2From: Peter Kjellerstedt <pkj@axis.com>
3Date: Fri, 17 Mar 2017 03:18:28 +0100
4Subject: [PATCH] Avoid bashisms in init scripts
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
9---
10 scripts/blk_availability_init_red_hat.in | 4 ++--
11 scripts/clvmd_init_red_hat.in | 6 +++---
12 scripts/cmirrord_init_red_hat.in | 4 ++--
13 scripts/lvm2_cluster_activation_red_hat.sh.in | 4 ++--
14 scripts/lvm2_lvmetad_init_red_hat.in | 4 ++--
15 scripts/lvm2_lvmpolld_init_red_hat.in | 4 ++--
16 scripts/lvm2_monitoring_init_red_hat.in | 4 ++--
17 scripts/lvm2_monitoring_init_rhel4 | 4 ++--
18 8 files changed, 17 insertions(+), 17 deletions(-)
19
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020Index: LVM2.2.02.177/scripts/blk_availability_init_red_hat.in
21===================================================================
22--- LVM2.2.02.177.orig/scripts/blk_availability_init_red_hat.in
23+++ LVM2.2.02.177/scripts/blk_availability_init_red_hat.in
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024@@ -1,4 +1,4 @@
25-#!/bin/bash
26+#!/bin/sh
27 #
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028 # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029 #
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030@@ -51,6 +51,6 @@ case "$1" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031 status)
32 ;;
33 *)
34- echo $"Usage: $0 {start|stop|status}"
35+ echo "Usage: $0 {start|stop|status}"
36 ;;
37 esac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038Index: LVM2.2.02.177/scripts/clvmd_init_red_hat.in
39===================================================================
40--- LVM2.2.02.177.orig/scripts/clvmd_init_red_hat.in
41+++ LVM2.2.02.177/scripts/clvmd_init_red_hat.in
Brad Bishop6e60e8b2018-02-01 10:27:11 -050042@@ -1,4 +1,4 @@
43-#!/bin/bash
44+#!/bin/sh
45 #
46 # clvmd - Clustered LVM Daemon init script
47 #
48@@ -161,7 +161,7 @@ restart() {
49 fi
50 }
51
52-[ "$EUID" != "0" ] && {
53+[ "$(id -u)" != "0" ] && {
54 echo "clvmd init script can only be executed as root user"
55 exit 4
56 }
57@@ -206,7 +206,7 @@ case "$1" in
58 ;;
59
60 *)
61- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
62+ echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
63 rtrn=2
64 ;;
65 esac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080066Index: LVM2.2.02.177/scripts/cmirrord_init_red_hat.in
67===================================================================
68--- LVM2.2.02.177.orig/scripts/cmirrord_init_red_hat.in
69+++ LVM2.2.02.177/scripts/cmirrord_init_red_hat.in
Brad Bishop6e60e8b2018-02-01 10:27:11 -050070@@ -1,4 +1,4 @@
71-#!/bin/bash
72+#!/bin/sh
73 #
74 # chkconfig: - 22 78
75 # description: Starts and stops cmirrord
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080076@@ -103,7 +103,7 @@ case "$1" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -050077 ;;
78
79 *)
80- echo $"Usage: $0 {start|stop|restart|status}"
81+ echo "Usage: $0 {start|stop|restart|status}"
82 ;;
83 esac
84
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080085Index: LVM2.2.02.177/scripts/lvm2_cluster_activation_red_hat.sh.in
86===================================================================
87--- LVM2.2.02.177.orig/scripts/lvm2_cluster_activation_red_hat.sh.in
88+++ LVM2.2.02.177/scripts/lvm2_cluster_activation_red_hat.sh.in
Brad Bishop6e60e8b2018-02-01 10:27:11 -050089@@ -1,4 +1,4 @@
90-#!/bin/bash
91+#!/bin/sh
92
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080093 sbindir="@SBINDIR@"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050094
95@@ -54,7 +54,7 @@ case "$1" in
96 rtrn=$?
97 ;;
98 *)
99- echo $"Usage: $0 {activate|deactivate}"
100+ echo "Usage: $0 {activate|deactivate}"
101 rtrn=3
102 ;;
103 esac
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800104Index: LVM2.2.02.177/scripts/lvm2_lvmetad_init_red_hat.in
105===================================================================
106--- LVM2.2.02.177.orig/scripts/lvm2_lvmetad_init_red_hat.in
107+++ LVM2.2.02.177/scripts/lvm2_lvmetad_init_red_hat.in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500108@@ -1,4 +1,4 @@
109-#!/bin/bash
110+#!/bin/sh
111 #
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800112 # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
113 #
114@@ -103,7 +103,7 @@ case "$1" in
115 ;;
116
117 *)
118- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
119+ echo "Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
120 ;;
121 esac
122
123Index: LVM2.2.02.177/scripts/lvm2_lvmpolld_init_red_hat.in
124===================================================================
125--- LVM2.2.02.177.orig/scripts/lvm2_lvmpolld_init_red_hat.in
126+++ LVM2.2.02.177/scripts/lvm2_lvmpolld_init_red_hat.in
127@@ -1,4 +1,4 @@
128-#!/bin/bash
129+#!/bin/sh
130 #
131 # Copyright (C) 2015 Red Hat, Inc. All rights reserved.
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500132 #
133@@ -105,7 +105,7 @@ case "$1" in
134 ;;
135
136 *)
137- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
138+ echo "Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
139 ;;
140 esac
141
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800142Index: LVM2.2.02.177/scripts/lvm2_monitoring_init_red_hat.in
143===================================================================
144--- LVM2.2.02.177.orig/scripts/lvm2_monitoring_init_red_hat.in
145+++ LVM2.2.02.177/scripts/lvm2_monitoring_init_red_hat.in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500146@@ -1,4 +1,4 @@
147-#!/bin/bash
148+#!/bin/sh
149 #
150 # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
151 #
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800152@@ -127,7 +127,7 @@ case "$1" in
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500153 ;;
154
155 *)
156- echo $"Usage: $0 {start|stop|restart|status|force-stop}"
157+ echo "Usage: $0 {start|stop|restart|status|force-stop}"
158 ;;
159 esac
160
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800161Index: LVM2.2.02.177/scripts/lvm2_monitoring_init_rhel4
162===================================================================
163--- LVM2.2.02.177.orig/scripts/lvm2_monitoring_init_rhel4
164+++ LVM2.2.02.177/scripts/lvm2_monitoring_init_rhel4
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500165@@ -1,4 +1,4 @@
166-#!/bin/bash
167+#!/bin/sh
168 #
169 # Copyright (C) 2007 Red Hat, Inc. All rights reserved.
170 #
171@@ -93,7 +93,7 @@ case "$1" in
172 ;;
173
174 *)
175- echo $"Usage: $0 {start|stop|restart|status|force-stop}"
176+ echo "Usage: $0 {start|stop|restart|status|force-stop}"
177 ;;
178 esac
179