diff options
| author | Jaromil <[email protected]> | 2011-09-04 20:53:11 (GMT) |
|---|---|---|
| committer | Jaromil <[email protected]> | 2011-09-04 20:53:11 (GMT) |
| commit | d348de25146fb06a14efa6668bfaec35af0b35e3 (patch) | |
| tree | fa242f68553e65b463ce18167e8f725090128e94 | |
| parent | 7c762fae4e337f6b9d0f9cb35c681d3cbd15ea9c (diff) | |
volatile mode
this leaves us in a shell in the middle of the boot process
useful in development and other situations
kernel append can be volatile=yes or volatile=premount
| -rwxr-xr-x | dyneIII/live-init-scripts/scripts/live | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/dyneIII/live-init-scripts/scripts/live b/dyneIII/live-init-scripts/scripts/live index 82f5413..ac0d322 100755 --- a/dyneIII/live-init-scripts/scripts/live +++ b/dyneIII/live-init-scripts/scripts/live @@ -352,6 +352,10 @@ Arguments () UNIONTYPE="${ARGUMENT#union=}" export UNIONTYPE ;; + volatile=*) + VOLATILE="${ARGUMENT#volatile=}" + export VOLATILE + ;; esac done @@ -913,7 +917,7 @@ do_httpmount () then if [ -d "${alt_mountpoint}" ] then - umount "${alt_mountpoint}" + umount "${alt_mountpoint}" rmdir "${alt_mountpoint}" fi umount "${mountpoint}" @@ -1574,7 +1578,7 @@ check_dev () ISO_DEVICE=$(dirname ${ISO_DEVICE}) [ -b "$ISO_DEVICE" ] && break i=$(($i -1)) - done + done fi if [ "$ISO_DEVICE" = "/" ] @@ -1841,6 +1845,10 @@ mountroot () run_scripts /scripts/live-premount log_end_msg + if [ "${VOLATILE}" = "premount" ]; then + PS1='(volatile) ' /bin/sh -i </dev/console >/dev/console 2>&1 + fi + # Needed here too because some things (*cough* udev *cough*) # changes the timeout @@ -1992,8 +2000,13 @@ mountroot () umount "${rootmnt}/dev" fi + if [ -n "${VOLATILE}" ]; then + PS1='(volatile) ' /bin/sh -i </dev/console >/dev/console 2>&1 + fi + exec 1>&6 6>&- exec 2>&7 7>&- kill ${tailpid} [ -w "${rootmnt}/var/log/" ] && cp live-boot.log "${rootmnt}/var/log/" 2>/dev/null + } |

