From: Richard Jones Date: Tue, 22 Sep 2009 18:51:47 +0000 (+0100) Subject: Tidy up appliance rescue code. X-Git-Tag: 1.0.72~12 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=d186e9d3d371162774d026f85823d9615ac3bbbc;p=libguestfs.git Tidy up appliance rescue code. The appliance shouldn't run the daemon after we leave the rescue shell. It should just exit instead. --- diff --git a/appliance/init b/appliance/init index fe135b4..8b97590 100755 --- a/appliance/init +++ b/appliance/init @@ -61,7 +61,11 @@ lsmod # Improve virtio-blk performance (RHBZ#509383). for f in /sys/block/vd*/queue/rotational; do echo 1 > $f; done -if grep -sq guestfs_rescue=1 /proc/cmdline; then - bash -i +if ! grep -sq guestfs_rescue=1 /proc/cmdline; then + exec guestfsd -f fi -exec guestfsd -f + +TERM=linux ;# XXX library should pass this from library's environment +PS1='> ' +export TERM PS1 +exec bash -i