forked from mirrors/nixpkgs
* nixos-install: copy /etc/nsswitch.conf to the chroot. This seems
necessary to have it use /etc/hosts. svn path=/nixos/trunk/; revision=19905
This commit is contained in:
parent
b7b1f5d1cc
commit
dbc03fbf68
|
@ -51,8 +51,11 @@ NIXOS=$(readlink -f "$NIXOS")
|
|||
# Enable networking in the chroot.
|
||||
mkdir -m 0755 -p $mountPoint/etc
|
||||
touch /etc/resolv.conf
|
||||
cp /etc/resolv.conf $mountPoint/etc/
|
||||
cp /etc/hosts $mountPoint/etc/
|
||||
cp -f /etc/resolv.conf $mountPoint/etc/
|
||||
rm -f $mountPoint/etc/hosts
|
||||
cat /etc/hosts > $mountPoint/etc/hosts
|
||||
rm -f $mountPoint/etc/nsswitch.conf
|
||||
cat /etc/nsswitch.conf > $mountPoint/etc/nsswitch.conf
|
||||
|
||||
# Mount some stuff in the target root directory.
|
||||
mkdir -m 0755 -p $mountPoint/dev $mountPoint/proc $mountPoint/sys $mountPoint/mnt
|
||||
|
|
|
@ -133,7 +133,8 @@ let
|
|||
${optionalString testChannel ''
|
||||
# Allow the machine to talk to the fake nixos.org.
|
||||
$machine->mustSucceed(
|
||||
"echo 192.168.1.1 nixos.org >> /etc/hosts",
|
||||
"rm /etc/hosts",
|
||||
"echo 192.168.1.1 nixos.org > /etc/hosts",
|
||||
"ifconfig eth1 up 192.168.1.2",
|
||||
"nix-pull http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST",
|
||||
);
|
||||
|
@ -174,13 +175,11 @@ let
|
|||
# Did /boot get mounted, if appropriate?
|
||||
# !!! There is currently no good way to wait for the
|
||||
# `filesystems' tash to finish.
|
||||
#$machine->mustSucceed("initctl start filesystems");
|
||||
#$machine->mustSucceed("test -e /boot/grub/grub.cfg");
|
||||
$machine->waitForFile("/boot/grub/grub.cfg");
|
||||
|
||||
# Did the swap device get activated?
|
||||
# !!! Idem.
|
||||
# $machine->waitForJob("swap");
|
||||
#$machine->mustSucceed("cat /proc/swaps | grep -q /dev");
|
||||
$machine->waitUntilSucceeds("cat /proc/swaps | grep -q /dev");
|
||||
|
||||
$machine->mustSucceed("nix-env -i coreutils >&2");
|
||||
$machine->mustSucceed("type -tP ls") =~ /profiles/
|
||||
|
|
Loading…
Reference in a new issue