summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2016-12-20 15:12:13 +0100
committerThomas Deutschmann <whissi@gentoo.org>2016-12-20 15:18:52 +0100
commit0dd7636ffc8d8522454176ddfd4d0c3088d15edd (patch)
treeb25e65eb2fa3558c54d6c8a9044b9ed73d3802a3 /net-firewall
parentdev-libs/gmp: add Prefix support (diff)
downloadgentoo-0dd7636ffc8d8522454176ddfd4d0c3088d15edd.tar.gz
gentoo-0dd7636ffc8d8522454176ddfd4d0c3088d15edd.tar.bz2
gentoo-0dd7636ffc8d8522454176ddfd4d0c3088d15edd.zip
net-firewall/shorewall: fix bashisms in init.d script
Package-Manager: Portage-2.3.2, Repoman-2.3.1
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/shorewall/files/shorewall-lite.initd-r26
-rw-r--r--net-firewall/shorewall/files/shorewall.initd-r26
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 689f94b38463..7777e3b99d65 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 c23bfb75c586..fa02b141588f 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