summaryrefslogtreecommitdiff
path: root/templates/system
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2013-04-12 11:55:45 -0700
committerJohn Southworth <john.southworth@vyatta.com>2013-04-12 14:16:01 -0700
commit533d485fb984fb2e3c54b070e441ce2d49e97cc9 (patch)
tree98d86f4f8f1e1eda27c4eb80fe33c9341e5a972e /templates/system
parentd996795c29779698dac11eb02b5532eedb3913fd (diff)
downloadvyatta-cfg-system-533d485fb984fb2e3c54b070e441ce2d49e97cc9.tar.gz
vyatta-cfg-system-533d485fb984fb2e3c54b070e441ce2d49e97cc9.zip
Bugfix 8711: Switch to Bash syntax for conditionals
Diffstat (limited to 'templates/system')
-rw-r--r--templates/system/ipv6/disable-forwarding/node.def10
1 files changed, 7 insertions, 3 deletions
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