mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-19 00:20:32 +03:00
Added install-test.sh - automatic verification of rescue-cd-configurable.nix (currently it passes)
svn path=/nixos/trunk/; revision=12006
This commit is contained in:
parent
b8aa6c6f31
commit
ae4ead1a33
5 changed files with 124 additions and 1 deletions
|
@ -39,15 +39,45 @@ cat > /mnt/etc/nixos/configuration.nix <<EOF
|
|||
sshd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
extraJobs = [
|
||||
{
|
||||
name = "Host-call-back";
|
||||
job = ''
|
||||
start on network-interfaces/started
|
||||
script
|
||||
while ! /var/run/current-system/sw/sbin/ifconfig eth0 |
|
||||
/var/run/current-system/sw/bin/grep "inet addr:" &>/dev/null; do
|
||||
sleep 1;
|
||||
done
|
||||
echo -e "Installation finished\nOK" | /var/run/current-system/sw/bin/socat stdio tcp:10.0.2.2:4424 | {
|
||||
read;
|
||||
if [ "\\\$REPLY" = "reboot" ] ; then
|
||||
/var/run/current-system/sw/sbin/start ctrl-alt-delete;
|
||||
fi;
|
||||
}
|
||||
end script
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableFontConfig = false;
|
||||
};
|
||||
|
||||
environment = {
|
||||
extraPackages = pkgs: [
|
||||
pkgs.socat
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
nixos-install
|
||||
|
||||
echo Installation finished
|
||||
|
||||
start ctrl-alt-delete
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue