aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2011-02-11 17:02:39 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2011-02-11 17:02:39 -0500
commit73b86299158759b7c599b72fe88aadfaa001e18e (patch)
tree3e1b0847f49365b1c7e6824935942f16372536ce
parent8ee6019cce14fef6ddc64f9b22281ed43b6491bf (diff)
downloadkvm-manager-73b86299158759b7c599b72fe88aadfaa001e18e.tar.gz
kvm-manager-73b86299158759b7c599b72fe88aadfaa001e18e.tar.bz2
switch the order of invocation back around as well -- should make for a cleaner startup.
-rwxr-xr-xkvm-manager15
1 files changed, 7 insertions, 8 deletions
diff --git a/kvm-manager b/kvm-manager
index d7b74e6..f38ddc5 100755
--- a/kvm-manager
+++ b/kvm-manager
@@ -68,9 +68,6 @@ $1
EOF
}
- chpst -u "$OWNER:$OWNERGROUP" \
- /usr/bin/screen -D -m -L -c /etc/screenrc.kvm-manager -S "$VMNAME" -t "$VMNAME" socat STDIO,raw,echo=0 "UNIX:${CONSOLENAME},retry=30" &
-
chpst -u "$OWNER:$OWNERGROUP:kvm" \
/usr/bin/kvm $KVMARGS \
-M "${MACHINE:-pc}" \
@@ -89,19 +86,21 @@ EOF
-device "virtio-net-pci,vlan=0,id=net0,mac=$MAC,bus=pci.0" \
-net "tap,ifname=$TAP,script=no,downscript=no,vlan=0,name=hostnet0" &
+ chpst -u "$OWNER:$OWNERGROUP" \
+ /usr/bin/screen -D -m -L -c /etc/screenrc.kvm-manager -S "$VMNAME" -t "$VMNAME" socat STDIO,raw,echo=0 "UNIX:${CONSOLENAME},retry=30" &
set +e
# handle regular signals
- trap 'kvmsend system_reset; wait %2' HUP
- trap 'kvmsend system_powerdown; wait %2' TERM
- trap 'kvmsend cont; wait %2' CONT
+ trap 'kvmsend system_reset; wait %1' HUP
+ trap 'kvmsend system_powerdown; wait %1' TERM
+ trap 'kvmsend cont; wait %1' CONT
# use SIGINT instead of SIGSTOP for freezing the guest because
# trapping SIGSTOP is undefined:
# http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_28
- trap 'kvmsend stop; wait %2' INT
+ trap 'kvmsend stop; wait %1' INT
trap 'kill %1 ; kill %2' EXIT
- wait %2
+ wait %1
}