Check whether /proc/sys/net/ipv6/conf/all/disable_ipv6 exists

This commit is contained in:
Eelco Dolstra 2012-12-11 13:14:17 +01:00
parent b1da38f564
commit 745a201814

View File

@ -275,7 +275,9 @@ in
EOF
# Disable or enable IPv6.
echo ${if cfg.enableIPv6 then "0" else "1"} > /proc/sys/net/ipv6/conf/all/disable_ipv6
if [ -e /proc/sys/net/ipv6/conf/all/disable_ipv6 ]; then
echo ${if cfg.enableIPv6 then "0" else "1"} > /proc/sys/net/ipv6/conf/all/disable_ipv6
fi
# Set the default gateway.
${optionalString (cfg.defaultGateway != "") ''