From 50d8698fd8fc89301db1cce56d73132da76772d7 Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Wed, 24 Nov 2010 22:58:42 +0000 Subject: [PATCH] network-interfaces: cleanup svn path=/nixos/trunk/; revision=24845 --- modules/tasks/network-interfaces.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index 562a945d832a..d24f7c923cee 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -8,6 +8,8 @@ let cfg = config.networking; + ifconfig = "${nettools}/sbin/ifconfig"; + in { @@ -157,7 +159,7 @@ in for i in $(cd /sys/class/net && ls -d *); do echo "Bringing up network device $i..." - ${nettools}/sbin/ifconfig $i up || true + ${ifconfig} $i up || true done # Configure the manually specified interfaces. @@ -169,7 +171,7 @@ in if test -n "${i.subnetMask}"; then extraFlags="$extraFlags netmask ${i.subnetMask}" fi - ${nettools}/sbin/ifconfig "${i.name}" "${i.ipAddress}" $extraFlags || true + ${ifconfig} "${i.name}" "${i.ipAddress}" $extraFlags || true '' else "") cfg.interfaces} @@ -202,7 +204,7 @@ in '' #for i in $(cd /sys/class/net && ls -d *); do # echo "Taking down network device $i..." - # ${nettools}/sbin/ifconfig $i down || true + # ${ifconfig} $i down || true #done ''; };