initrd: Run a rescue shell if vfs.real_root is not set
authorFrançois Tigeot <ftigeot@wolfpond.org>
Wed, 9 Apr 2014 14:54:52 +0000 (16:54 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Wed, 9 Apr 2014 20:26:20 +0000 (22:26 +0200)
share/initrd/etc/rc [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 4f8d685..1009a99
@@ -32,6 +32,10 @@ if [ "$?" -ne "0" ]; then
                "kernel if you intend to use initrd"
        rescue_shell
 fi
+if [ -z "${REAL_ROOT}" ]; then
+       echo "vfs.real_root sysctl not set. Dropping to a rescue shell."
+       rescue_shell
+fi
 set -- $REAL_ROOT
 TYPE=$1
 unset IFS