From 0b7f54ad6b2a546ec71d62652074b88d509075c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 6 Mar 2008 01:20:09 +0000 Subject: [PATCH] Untested Bootscript.cd git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24260 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- data/system/boot/Bootscript | 7 +++ data/system/boot/Bootscript.cd | 99 ++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 data/system/boot/Bootscript.cd diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index 77775a953f..b3096b72c7 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -59,6 +59,13 @@ export SAFEMODE=`/bin/safemode` launchscript $SCRIPTS/SetupEnvironment +# If the boot volume is a CD we use another script +iw=`/bin/isvolume -readonly /boot` +if [ "$iw" = "yes" ]; then + launchscript $SCRIPTS/Bootscript.cd + exit 0 # and return +fi + # Sets timezone etc. runprog beos/bin/clockconfig diff --git a/data/system/boot/Bootscript.cd b/data/system/boot/Bootscript.cd new file mode 100644 index 0000000000..617f0f0e68 --- /dev/null +++ b/data/system/boot/Bootscript.cd @@ -0,0 +1,99 @@ +## The system's main CD boot script. + +## +## Some functions used by the main script +## + +# launch [thread to wait for] + +launch() { + if [ -f "/boot/$1" ] + then + "/boot/$1" & + [ "$2" != "" ] && waitfor "$2" + return 1 + else + echo There is no "$1" + fi + return 0 +} + +# launchscript