From 0dd7636ffc8d8522454176ddfd4d0c3088d15edd Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Tue, 20 Dec 2016 15:12:13 +0100 Subject: [PATCH] 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 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 -- 2.26.2