diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-09-22 19:51:47 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-09-23 11:18:45 +0100 |
commit | d186e9d3d371162774d026f85823d9615ac3bbbc (patch) | |
tree | 2a49b6630d88dafbecdb6357bc1ef4fae28ad094 /appliance | |
parent | 0d9325bd101e4e96d7d0a6c9640874cbb1e15ed1 (diff) | |
download | libguestfs-d186e9d3d371162774d026f85823d9615ac3bbbc.tar.gz libguestfs-d186e9d3d371162774d026f85823d9615ac3bbbc.tar.xz libguestfs-d186e9d3d371162774d026f85823d9615ac3bbbc.zip |
Tidy up appliance rescue code.
The appliance shouldn't run the daemon after we leave the
rescue shell. It should just exit instead.
Diffstat (limited to 'appliance')
-rwxr-xr-x | appliance/init | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/appliance/init b/appliance/init index fe135b44..8b97590a 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='><rescue> ' +export TERM PS1 +exec bash -i |