Add guestfs_rescue=1 appliance option to start a rescue shell.
authorRichard Jones <rjones@redhat.com>
Thu, 11 Jun 2009 16:27:18 +0000 (17:27 +0100)
committerRichard Jones <rjones@redhat.com>
Thu, 11 Jun 2009 16:27:18 +0000 (17:27 +0100)
TODO
appliance/make-initramfs.sh.in

diff --git a/TODO b/TODO
index 3c123d4..1e265c2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -110,13 +110,6 @@ code directly into libguestfs?
 
 ----------------------------------------------------------------------
 
 
 ----------------------------------------------------------------------
 
-guestfs rescue shell
-
-Have a kernel command line option to enable a rescue shell
-from guestfsd.
-
-----------------------------------------------------------------------
-
 PPC problems:
 
   ppc (32 bit) works with qemu from git, however there is no serial console
 PPC problems:
 
   ppc (32 bit) works with qemu from git, however there is no serial console
index b1d3c39..b39b13d 100755 (executable)
@@ -156,6 +156,9 @@ modprobe dm_mod ||:
 /sbin/route add default gw 10.0.2.2
 lvm vgscan --ignorelockingfailure
 lvm vgchange -ay --ignorelockingfailure
 /sbin/route add default gw 10.0.2.2
 lvm vgscan --ignorelockingfailure
 lvm vgchange -ay --ignorelockingfailure
+if grep -sq guestfs_rescue=1 /proc/cmdline; then
+  bash -i
+fi
 exec guestfsd -f
 __EOF__
 
 exec guestfsd -f
 __EOF__