From a1d7974acd1a6c7d527dd0adc9fe711983990074 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 16 Feb 2014 16:47:23 +0100 Subject: [PATCH] vm/windows: Remove Samba from installMode. This should trim down possible dependencies on the base installation and hereby reduce the need for reinstallation of the damn VM to only changes that affect the Windows installation and the base Cygwin + OpenSSH setup. Signed-off-by: aszlig --- .../vm/windows/controller/default.nix | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix index da3be51c102..3d763468113 100644 --- a/pkgs/build-support/vm/windows/controller/default.nix +++ b/pkgs/build-support/vm/windows/controller/default.nix @@ -67,6 +67,19 @@ let initScript = writeScript "init.sh" ('' #!${stdenv.shell} + ${coreutils}/bin/cp -L "${sshKey}" /ssh.key + ${coreutils}/bin/chmod 600 /ssh.key + '' + (if installMode then '' + echo -n "Waiting for Windows installation to finish..." + while ! ${netcat}/bin/netcat -z 192.168.0.1 22; do + echo -n . + # Print a dot every 10 seconds only to shorten line length. + ${coreutils}/bin/sleep 10 + done + echo " success." + # Loop forever, because this VM is going to be killed. + ${loopForever} + '' else '' ${coreutils}/bin/mkdir -p /etc/samba /etc/samba/private /var/lib/samba ${coreutils}/bin/cat > /etc/samba/smb.conf <