From 745a2018147efd1bad16ec41bc7eaa55a1678dba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Dec 2012 13:14:17 +0100 Subject: [PATCH] Check whether /proc/sys/net/ipv6/conf/all/disable_ipv6 exists --- modules/tasks/network-interfaces.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index 412e62bfe80c..64cb4a6749eb 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -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 != "") ''