diff options
author | Eric Hameleers <alien@slackware.com> | 2016-03-11 16:25:22 +0100 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2016-03-11 16:25:22 +0100 |
commit | b29a08b43fd682594ca23521c09e8f06bee20ddc (patch) | |
tree | 7879897f4be5c9042ba781c1d894228beeb88065 /liveinit | |
parent | b38517c342858d6a38cc264ccf7d911b32044ff4 (diff) | |
download | liveslak-b29a08b43fd682594ca23521c09e8f06bee20ddc.tar.gz liveslak-b29a08b43fd682594ca23521c09e8f06bee20ddc.tar.xz |
liveinit: put the 'rescue shell' commands into a function call.
Diffstat (limited to 'liveinit')
-rwxr-xr-x | liveinit | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -191,6 +191,24 @@ debugit () { return } +rescue() { + if [ "x$1" != "x" ]; then + echo "$1" + fi + echo + echo "RESCUE mode" + echo + echo " You can try to fix or rescue your system now. If you want" + echo " to boot into your fixed system, mount your root filesystem" + echo " read-only under /mnt:" + echo + echo " # mount -o ro -t filesystem root_device /mnt" + echo + echo " Type 'exit' when things are done." + echo + /bin/sh +} + # If udevd is available, use it to generate block devices # else use mdev to read sysfs and generate the needed devices if [ -x /sbin/udevd -a -x /sbin/udevadm ]; then @@ -428,6 +446,8 @@ if [ "$RESCUE" = "" ]; then else echo "${MARKER}: No live media found... trouble ahead." echo "${MARKER}: Try adding \"rootdelay=20\" to the boot command." + debugit + rescue fi debugit @@ -750,18 +770,7 @@ EOT /bin/sh fi else - echo - echo "RESCUE mode" - echo - echo " You can try to fix or rescue your system now. If you want" - echo " to boot into your fixed system, mount your root filesystem" - echo " read-only under /mnt:" - echo - echo " # mount -o ro -t filesystem root_device /mnt" - echo - echo " Type 'exit' when things are done." - echo - /bin/sh + rescue fi # Need to make sure OPTIONS+="db_persist" exists for all dm devices |