mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 09:33:41 +00:00
Check whether /proc/sys/net/ipv6/conf/all/disable_ipv6 exists
This commit is contained in:
parent
b1da38f564
commit
745a201814
@ -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 != "") ''
|
||||
|
Loading…
Reference in New Issue
Block a user