From 533d485fb984fb2e3c54b070e441ce2d49e97cc9 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 12 Apr 2013 11:55:45 -0700 Subject: Bugfix 8711: Switch to Bash syntax for conditionals --- templates/system/ipv6/disable-forwarding/node.def | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'templates/system') diff --git a/templates/system/ipv6/disable-forwarding/node.def b/templates/system/ipv6/disable-forwarding/node.def index 10357338..eefb8328 100644 --- a/templates/system/ipv6/disable-forwarding/node.def +++ b/templates/system/ipv6/disable-forwarding/node.def @@ -23,10 +23,12 @@ delete: sudo sh -c "echo 1 > /proc/sys/net/ipv6/conf/all/forwarding" cd /proc/sys/net/ipv6/conf for i in * ; do - if [ "$i" = "default" -o "$i" = "all" -o ! -d "$i" ]; then + if [[ "$i" == "default" ]] || + [[ "$i" == "all" ]] || + [[ ! -d "$i" ]; then continue fi - if [ -e /var/run/vyatta/ipv6_no_fwd.$i ]; then + if [[ -e /var/run/vyatta/ipv6_no_fwd.$i ]]; then sudo sh -c "echo 0 > $i/forwarding" fi done @@ -36,7 +38,9 @@ delete: # forwarding was disabled, we will need to start the radvd daemon # now. running=$(pgrep -n radvd) - if [ $running -eq 0 -a -e /etc/radvd.conf -a -x /etc/init.d/radvd ]; then + if [[ $running -eq 0 ]] && + [[ -e /etc/radvd.conf ]] && + [[ -x /etc/init.d/radvd ]; then /etc/init.d/radvd start fi -- cgit v1.2.3