commit: 0dd7636ffc8d8522454176ddfd4d0c3088d15edd
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 14:12:13 2016 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 14:18:52 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dd7636f
net-firewall/shorewall: fix bashisms in init.d script
Package-Manager: Portage-2.3.2, Repoman-2.3.1
net-firewall/shorewall/files/shorewall-lite.initd-r2 | 6 ++++--
net-firewall/shorewall/files/shorewall.initd-r2 | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/net-firewall/shorewall/files/shorewall-lite.initd-r2
b/net-firewall/shorewall/files/shorewall-lite.initd-r2
index 689f94b..7777e3b 100644
--- a/net-firewall/shorewall/files/shorewall-lite.initd-r2
+++ b/net-firewall/shorewall/files/shorewall-lite.initd-r2
@@ -3,7 +3,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-if [[ "${RC_SVCNAME}" == "shorewall6-lite" ]]; then
+if [ "${RC_SVCNAME}" = "shorewall6-lite" ]; then
PRODUCT_NAME="Shorewall6-Lite"
command="/usr/sbin/shorewall6-lite"
else
@@ -51,9 +51,11 @@ reset() {
}
restart() {
+ local _retval
ebegin "Restarting ${RC_SVCNAME}"
${command} status 1>/dev/null
- if [ $? != 0 ] ; then
+ _retval=$?
+ if [ ${_retval} = '0' ]; then
svc_start
else
${command} ${OPTIONS} restart ${RESTARTOPTIONS} 1>/dev/null
diff --git a/net-firewall/shorewall/files/shorewall.initd-r2
b/net-firewall/shorewall/files/shorewall.initd-r2
index c23bfb7..fa02b14 100644
--- a/net-firewall/shorewall/files/shorewall.initd-r2
+++ b/net-firewall/shorewall/files/shorewall.initd-r2
@@ -3,7 +3,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-if [[ "${RC_SVCNAME}" == "shorewall6" ]]; then
+if [ "${RC_SVCNAME}" = "shorewall6" ]; then
PRODUCT_NAME="Shorewall6"
command="/usr/sbin/shorewall6"
else
@@ -68,9 +68,11 @@ reset() {
}
restart() {
+ local _retval
ebegin "Restarting ${RC_SVCNAME}"
${command} status 1>/dev/null
- if [ $? != 0 ] ; then
+ _retval=$?
+ if [ ${_retval} = '0' ]; then
svc_start
else
${command} ${OPTIONS} restart ${RESTARTOPTIONS} 1>/dev/null