Change the Bootscript and Bootscript.cd to use the new isvolume -readonly-partition
feature and offer the user to boot into the Installer or into the Desktop (Live-CD mode). Thanks to Vincent Duvert who offered a method that worked around some interference from mysterious debug output... The launching of the servers has been refactored, since that needs to be done anyways before an alert can be shown. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30332 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -70,14 +70,16 @@ export SAFEMODE=`/bin/safemode`
|
||||
launchscript $SCRIPTS/SetupEnvironment
|
||||
|
||||
# If the boot volume is a CD we use another script
|
||||
iw=`/bin/isvolume -readonly /boot`
|
||||
iw=`/bin/isvolume -readonly-partition /boot`
|
||||
if [ "$iw" = "yes" ]; then
|
||||
launchscript $SCRIPTS/Bootscript.cd
|
||||
exit 0 # and return
|
||||
# block the CD tray (avoid accidental ejection)
|
||||
# This option stays 'on' even if we continue booting to the desktop.
|
||||
/bin/eject -b /boot
|
||||
else
|
||||
# Sets timezone etc.
|
||||
runprog system/bin/clockconfig
|
||||
fi
|
||||
|
||||
# Sets timezone etc.
|
||||
runprog system/bin/clockconfig
|
||||
|
||||
# Launch servers
|
||||
|
||||
@@ -102,6 +104,16 @@ if [ "$SAFEMODE" != "yes" ]; then
|
||||
waitfor _input_server_event_loop_ # wait for input devices
|
||||
fi
|
||||
|
||||
# Now ask the user if he wants to run the Installer or continue to the Desktop.
|
||||
if [ "$iw" = "yes" ]; then
|
||||
/bin/alert "Do you wish to run the Installer or continue booting to the Desktop?" "Installer" "Desktop"
|
||||
if [ $? -eq 0 ]; then
|
||||
launchscript $SCRIPTS/Bootscript.cd
|
||||
exit 0 # and return
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Launch Terminal or consoled depending on $SAFEMODE
|
||||
if [ "$SAFEMODE" != "yes" ]; then
|
||||
if [ -e /etc/users ]; then
|
||||
|
||||
Reference in New Issue
Block a user