* 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.
|
# Enable networking in the chroot.
|
||||||
mkdir -m 0755 -p $mountPoint/etc
|
mkdir -m 0755 -p $mountPoint/etc
|
||||||
touch /etc/resolv.conf
|
touch /etc/resolv.conf
|
||||||
cp /etc/resolv.conf $mountPoint/etc/
|
cp -f /etc/resolv.conf $mountPoint/etc/
|
||||||
cp /etc/hosts $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.
|
# Mount some stuff in the target root directory.
|
||||||
mkdir -m 0755 -p $mountPoint/dev $mountPoint/proc $mountPoint/sys $mountPoint/mnt
|
mkdir -m 0755 -p $mountPoint/dev $mountPoint/proc $mountPoint/sys $mountPoint/mnt
|
||||||
|
@ -133,7 +133,8 @@ let
|
|||||||
${optionalString testChannel ''
|
${optionalString testChannel ''
|
||||||
# Allow the machine to talk to the fake nixos.org.
|
# Allow the machine to talk to the fake nixos.org.
|
||||||
$machine->mustSucceed(
|
$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",
|
"ifconfig eth1 up 192.168.1.2",
|
||||||
"nix-pull http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST",
|
"nix-pull http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST",
|
||||||
);
|
);
|
||||||
@ -174,13 +175,11 @@ let
|
|||||||
# Did /boot get mounted, if appropriate?
|
# Did /boot get mounted, if appropriate?
|
||||||
# !!! There is currently no good way to wait for the
|
# !!! There is currently no good way to wait for the
|
||||||
# `filesystems' tash to finish.
|
# `filesystems' tash to finish.
|
||||||
#$machine->mustSucceed("initctl start filesystems");
|
$machine->waitForFile("/boot/grub/grub.cfg");
|
||||||
#$machine->mustSucceed("test -e /boot/grub/grub.cfg");
|
|
||||||
|
|
||||||
# Did the swap device get activated?
|
# Did the swap device get activated?
|
||||||
# !!! Idem.
|
# !!! Idem.
|
||||||
# $machine->waitForJob("swap");
|
$machine->waitUntilSucceeds("cat /proc/swaps | grep -q /dev");
|
||||||
#$machine->mustSucceed("cat /proc/swaps | grep -q /dev");
|
|
||||||
|
|
||||||
$machine->mustSucceed("nix-env -i coreutils >&2");
|
$machine->mustSucceed("nix-env -i coreutils >&2");
|
||||||
$machine->mustSucceed("type -tP ls") =~ /profiles/
|
$machine->mustSucceed("type -tP ls") =~ /profiles/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user