diff options
Diffstat (limited to 'net-firewall')
-rw-r--r-- | net-firewall/shorewall/files/shorewall-lite.initd-r2 | 6 | ||||
-rw-r--r-- | 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 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 |