[Nix-dev] RE: [Nix-commits] SVN commit: nix - r26280 -nixos/trunk/modules/virtualisation

Sander van der Burg - EWI S.vanderBurg at tudelft.nl
Fri Mar 11 17:04:25 CET 2011


Good thing. I believe ifconfig is deprecated a long time ago and it's use should be avoided.


-----Original Message-----
From: nix-commits-bounces at cs.uu.nl on behalf of Eelco Dolstra
Sent: Fri 3/11/2011 3:59 PM
To: nix-commits at cs.uu.nl
Subject: [Nix-commits] SVN commit: nix - r26280 -nixos/trunk/modules/virtualisation
 
Author: eelco
Date: Fri Mar 11 14:59:36 2011
New Revision: 26280
URL: https://svn.nixos.org/websvn/nix/?rev=26280&sc=1

Log:
* Replace ifconfig by ip in the initrd of VM tests.

Modified:
   nixos/trunk/modules/virtualisation/qemu-vm.nix

Modified: nixos/trunk/modules/virtualisation/qemu-vm.nix
==============================================================================
--- nixos/trunk/modules/virtualisation/qemu-vm.nix	Fri Mar 11 14:50:11 2011	(r26279)
+++ nixos/trunk/modules/virtualisation/qemu-vm.nix	Fri Mar 11 14:59:36 2011	(r26280)
@@ -247,14 +247,16 @@
       # We need mke2fs in the initrd.
       cp ${pkgs.e2fsprogs}/sbin/mke2fs $out/bin
 
-      # And `ifconfig'.
-      cp ${pkgs.nettools}/sbin/ifconfig $out/bin
+      # And `ip' (which needs libresolv.so).
+      cp ${pkgs.iproute}/sbin/ip $out/bin
+      cp ${pkgs.glibc}/lib/libresolv.so.* $out/lib
     '';
       
   boot.initrd.postDeviceCommands =
     ''
       # Set up networking.  Needed for CIFS mounting.
-      ifconfig eth0 up 10.0.2.15
+      ip link set eth0 up
+      ip addr add 10.0.2.15/24 dev eth0
 
       # If the disk image appears to be empty, run mke2fs to
       # initialise.
_______________________________________________
nix-commits mailing list
nix-commits at cs.uu.nl
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110311/e300c4d4/attachment.html 


More information about the nix-dev mailing list