Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 916ea0c70fd063ab7b81f16fd917a75dc02edf4f Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Kjellerstedt <pkj@axis.com> |
| 3 | Date: Fri, 17 Mar 2017 03:18:28 +0100 |
| 4 | Subject: [PATCH] Avoid bashisms in init scripts |
| 5 | |
| 6 | Upstream-Status: Inappropriate |
| 7 | |
| 8 | Signed-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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 20 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | @@ -1,4 +1,4 @@ |
| 25 | -#!/bin/bash |
| 26 | +#!/bin/sh |
| 27 | # |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 28 | # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | # |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 30 | @@ -51,6 +51,6 @@ case "$1" in |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | status) |
| 32 | ;; |
| 33 | *) |
| 34 | - echo $"Usage: $0 {start|stop|status}" |
| 35 | + echo "Usage: $0 {start|stop|status}" |
| 36 | ;; |
| 37 | esac |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 38 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 42 | @@ -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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 66 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 70 | @@ -1,4 +1,4 @@ |
| 71 | -#!/bin/bash |
| 72 | +#!/bin/sh |
| 73 | # |
| 74 | # chkconfig: - 22 78 |
| 75 | # description: Starts and stops cmirrord |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 76 | @@ -103,7 +103,7 @@ case "$1" in |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 77 | ;; |
| 78 | |
| 79 | *) |
| 80 | - echo $"Usage: $0 {start|stop|restart|status}" |
| 81 | + echo "Usage: $0 {start|stop|restart|status}" |
| 82 | ;; |
| 83 | esac |
| 84 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 85 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 89 | @@ -1,4 +1,4 @@ |
| 90 | -#!/bin/bash |
| 91 | +#!/bin/sh |
| 92 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 93 | sbindir="@SBINDIR@" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 94 | |
| 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 104 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 108 | @@ -1,4 +1,4 @@ |
| 109 | -#!/bin/bash |
| 110 | +#!/bin/sh |
| 111 | # |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 112 | # 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 | |
| 123 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 132 | # |
| 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 142 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 146 | @@ -1,4 +1,4 @@ |
| 147 | -#!/bin/bash |
| 148 | +#!/bin/sh |
| 149 | # |
| 150 | # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved. |
| 151 | # |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 152 | @@ -127,7 +127,7 @@ case "$1" in |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 153 | ;; |
| 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 161 | Index: 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 165 | @@ -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 | |