Do not depend on bash logout and pass -n to poweroff (9p is sync,dirsync)
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 7 May 2015 16:49:12 +0000 (19:49 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 7 May 2015 16:49:12 +0000 (19:49 +0300)
ex/makevm
lib/Gruntmaster/Daemon/Format.pm

index b9ceaaaa38c196a504b714d750c1b930415c75dc..efc3a21538e99453739ca6745ccf4fd1ce1aeffb 100755 (executable)
--- a/ex/makevm
+++ b/ex/makevm
@@ -4,7 +4,6 @@ mkdir -p vm/proc/
 mount /proc -o bind vm/proc
 multistrap -f ex/vm.conf
 ln -s vm/usr/bin/mawk vm/bin/awk
 mount /proc -o bind vm/proc
 multistrap -f ex/vm.conf
 ln -s vm/usr/bin/mawk vm/bin/awk
-echo '/sbin/poweroff -f' > vm/.bash_logout
 cat > vm/.profile <<EOF
 mount -t 9p -o trans=virtio virtfs /mnt
 mount -t ramfs ramfs /tmp
 cat > vm/.profile <<EOF
 mount -t 9p -o trans=virtio virtfs /mnt
 mount -t ramfs ramfs /tmp
index 6160a31e9460a08bba84bafb9f44eab524ffc89d..a492e63c80ecc9bd06b8c389495dd05325b6cdb7 100644 (file)
@@ -30,7 +30,7 @@ sub runvm {
        $vm{$name} = Expect::Simple->new({
                Cmd => $cmd,
                Prompt => '# ',
        $vm{$name} = Expect::Simple->new({
                Cmd => $cmd,
                Prompt => '# ',
-               DisconnectCmd => 'exit',
+               DisconnectCmd => '/sbin/poweroff -fn',
                RawPty => 1,
                Timeout => 10,
        });
                RawPty => 1,
                Timeout => 10,
        });
This page took 0.010797 seconds and 4 git commands to generate.