diff options
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2.inc | 2 | ||||
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2/0001-Avoid-bashisms-in-init-scripts.patch | 182 |
2 files changed, 183 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc index 3e795525f9..75fc51f8d5 100644 --- a/meta-oe/recipes-support/lvm2/lvm2.inc +++ b/meta-oe/recipes-support/lvm2/lvm2.inc | |||
| @@ -12,6 +12,7 @@ SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \ | |||
| 12 | file://0002-Guard-use-of-mallinfo-with-__GLIBC__.patch \ | 12 | file://0002-Guard-use-of-mallinfo-with-__GLIBC__.patch \ |
| 13 | file://0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch \ | 13 | file://0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch \ |
| 14 | file://0004-tweak-MODPROBE_CMD-for-cross-compile.patch \ | 14 | file://0004-tweak-MODPROBE_CMD-for-cross-compile.patch \ |
| 15 | file://0001-Avoid-bashisms-in-init-scripts.patch \ | ||
| 15 | " | 16 | " |
| 16 | S = "${WORKDIR}/LVM2.${PV}" | 17 | S = "${WORKDIR}/LVM2.${PV}" |
| 17 | 18 | ||
| @@ -98,7 +99,6 @@ FILES_libdevmapper-dev = " \ | |||
| 98 | " | 99 | " |
| 99 | 100 | ||
| 100 | RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash" | 101 | RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash" |
| 101 | RDEPENDS_${PN} = " bash" | ||
| 102 | RDEPENDS_libdevmapper-dev = "libdevmapper (= ${EXTENDPKGV})" | 102 | RDEPENDS_libdevmapper-dev = "libdevmapper (= ${EXTENDPKGV})" |
| 103 | RRECOMMENDS_${PN} = "${PN}-scripts (= ${EXTENDPKGV})" | 103 | RRECOMMENDS_${PN} = "${PN}-scripts (= ${EXTENDPKGV})" |
| 104 | 104 | ||
diff --git a/meta-oe/recipes-support/lvm2/lvm2/0001-Avoid-bashisms-in-init-scripts.patch b/meta-oe/recipes-support/lvm2/lvm2/0001-Avoid-bashisms-in-init-scripts.patch new file mode 100644 index 0000000000..e86ab25e62 --- /dev/null +++ b/meta-oe/recipes-support/lvm2/lvm2/0001-Avoid-bashisms-in-init-scripts.patch | |||
| @@ -0,0 +1,182 @@ | |||
| 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 | |||
| 20 | diff --git a/scripts/blk_availability_init_red_hat.in b/scripts/blk_availability_init_red_hat.in | ||
| 21 | index a84ffe7..6b855b7 100644 | ||
| 22 | --- a/scripts/blk_availability_init_red_hat.in | ||
| 23 | +++ b/scripts/blk_availability_init_red_hat.in | ||
| 24 | @@ -1,4 +1,4 @@ | ||
| 25 | -#!/bin/bash | ||
| 26 | +#!/bin/sh | ||
| 27 | # | ||
| 28 | # Copyright (C) 2012 Red Hat, Inc. All rights reserved. | ||
| 29 | # | ||
| 30 | @@ -53,6 +53,6 @@ case "$1" in | ||
| 31 | status) | ||
| 32 | ;; | ||
| 33 | *) | ||
| 34 | - echo $"Usage: $0 {start|stop|status}" | ||
| 35 | + echo "Usage: $0 {start|stop|status}" | ||
| 36 | ;; | ||
| 37 | esac | ||
| 38 | diff --git a/scripts/clvmd_init_red_hat.in b/scripts/clvmd_init_red_hat.in | ||
| 39 | index d7f3392..abc8011 100644 | ||
| 40 | --- a/scripts/clvmd_init_red_hat.in | ||
| 41 | +++ b/scripts/clvmd_init_red_hat.in | ||
| 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 | ||
| 66 | diff --git a/scripts/cmirrord_init_red_hat.in b/scripts/cmirrord_init_red_hat.in | ||
| 67 | index d4b7e37..d442cbc 100755 | ||
| 68 | --- a/scripts/cmirrord_init_red_hat.in | ||
| 69 | +++ b/scripts/cmirrord_init_red_hat.in | ||
| 70 | @@ -1,4 +1,4 @@ | ||
| 71 | -#!/bin/bash | ||
| 72 | +#!/bin/sh | ||
| 73 | # | ||
| 74 | # chkconfig: - 22 78 | ||
| 75 | # description: Starts and stops cmirrord | ||
| 76 | @@ -101,7 +101,7 @@ case "$1" in | ||
| 77 | ;; | ||
| 78 | |||
| 79 | *) | ||
| 80 | - echo $"Usage: $0 {start|stop|restart|status}" | ||
| 81 | + echo "Usage: $0 {start|stop|restart|status}" | ||
| 82 | ;; | ||
| 83 | esac | ||
| 84 | |||
| 85 | diff --git a/scripts/lvm2_cluster_activation_red_hat.sh.in b/scripts/lvm2_cluster_activation_red_hat.sh.in | ||
| 86 | index abea026..d8cba2e 100644 | ||
| 87 | --- a/scripts/lvm2_cluster_activation_red_hat.sh.in | ||
| 88 | +++ b/scripts/lvm2_cluster_activation_red_hat.sh.in | ||
| 89 | @@ -1,4 +1,4 @@ | ||
| 90 | -#!/bin/bash | ||
| 91 | +#!/bin/sh | ||
| 92 | |||
| 93 | sbindir=@sbindir@ | ||
| 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 | ||
| 104 | diff --git a/scripts/lvm2_lvmetad_init_red_hat.in b/scripts/lvm2_lvmetad_init_red_hat.in | ||
| 105 | index b2f5d50..96269a9 100644 | ||
| 106 | --- a/scripts/lvm2_lvmetad_init_red_hat.in | ||
| 107 | +++ b/scripts/lvm2_lvmetad_init_red_hat.in | ||
| 108 | @@ -1,4 +1,4 @@ | ||
| 109 | -#!/bin/bash | ||
| 110 | +#!/bin/sh | ||
| 111 | # | ||
| 112 | # Copyright (C) 2012 Red Hat, Inc. All rights reserved. | ||
| 113 | # | ||
| 114 | @@ -105,7 +105,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 | diff --git a/scripts/lvm2_lvmpolld_init_red_hat.in b/scripts/lvm2_lvmpolld_init_red_hat.in | ||
| 124 | index c521955..cdbaece 100644 | ||
| 125 | --- a/scripts/lvm2_lvmpolld_init_red_hat.in | ||
| 126 | +++ b/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. | ||
| 132 | # | ||
| 133 | @@ -107,7 +107,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 | |||
| 142 | diff --git a/scripts/lvm2_monitoring_init_red_hat.in b/scripts/lvm2_monitoring_init_red_hat.in | ||
| 143 | index de7ff0d..9ff6bb7 100644 | ||
| 144 | --- a/scripts/lvm2_monitoring_init_red_hat.in | ||
| 145 | +++ b/scripts/lvm2_monitoring_init_red_hat.in | ||
| 146 | @@ -1,4 +1,4 @@ | ||
| 147 | -#!/bin/bash | ||
| 148 | +#!/bin/sh | ||
| 149 | # | ||
| 150 | # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved. | ||
| 151 | # | ||
| 152 | @@ -128,7 +128,7 @@ case "$1" in | ||
| 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 | |||
| 161 | diff --git a/scripts/lvm2_monitoring_init_rhel4 b/scripts/lvm2_monitoring_init_rhel4 | ||
| 162 | index 8eb06c5..2e8d0f7 100644 | ||
| 163 | --- a/scripts/lvm2_monitoring_init_rhel4 | ||
| 164 | +++ b/scripts/lvm2_monitoring_init_rhel4 | ||
| 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 | |||
| 180 | -- | ||
| 181 | 2.12.0 | ||
| 182 | |||
