summaryrefslogtreecommitdiff
path: root/templates/system/ipv6/disable-forwarding/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/ipv6/disable-forwarding/node.def')
-rw-r--r--templates/system/ipv6/disable-forwarding/node.def25
1 files changed, 13 insertions, 12 deletions
diff --git a/templates/system/ipv6/disable-forwarding/node.def b/templates/system/ipv6/disable-forwarding/node.def
index b930e3d2..eefb8328 100644
--- a/templates/system/ipv6/disable-forwarding/node.def
+++ b/templates/system/ipv6/disable-forwarding/node.def
@@ -23,23 +23,24 @@ 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" ]] ||
- [[ "$i" == "all" ]] ||
- [[ ! -d "$i" ]]; then
- continue
- fi
- if [[ -e /var/run/vyatta/ipv6_no_fwd.$i ]]; then
- sudo sh -c "echo 0 > $i/forwarding"
- fi
+ if [[ "$i" == "default" ]] ||
+ [[ "$i" == "all" ]] ||
+ [[ ! -d "$i" ]; then
+ continue
+ fi
+ if [[ -e /var/run/vyatta/ipv6_no_fwd.$i ]]; then
+ sudo sh -c "echo 0 > $i/forwarding"
+ fi
done
sudo sh -c "echo 1 > /proc/sys/net/ipv6/conf/default/forwarding"
#
# If router advertisements were configured while global IPv6
# forwarding was disabled, we will need to start the radvd daemon
# now.
- if [[ -e /etc/radvd.conf ]]; then
- if [[ -z "$(pgrep -u radvd radvd)" ]]; then
- /etc/init.d/radvd start
- fi
+ running=$(pgrep -n radvd)
+ if [[ $running -eq 0 ]] &&
+ [[ -e /etc/radvd.conf ]] &&
+ [[ -x /etc/init.d/radvd ]; then
+ /etc/init.d/radvd start
fi