haiku/data/system/boot/Bootscript
Axel Dörfler 2cafbe7535 Since Bochs 2.2 can finally run the Haiku app_server, it is now enabled
by default. Select "safe mode" in the boot menu to get to the old consoled.
Note, if you're using VESA mode, make sure you run in 32 bit, or the
app_server will crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-07 00:54:23 +00:00

100 lines
1.7 KiB
Plaintext

## The system's main boot script.
##
## Some functions used by the main script
##
# launch <executable path> [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 <script path>
launchscript() {
if [ -f "/boot/$1" ]
then
. "/boot/$1"
fi
}
# runprog <executable path>
runprog() {
if [ -f "/boot/$1" ]
then
"/boot/$1"
return 1
else
echo There is no "$1"
fi
return 0
}
##
## Main script starts here
##
# Set up stdin/out/err to nirvana
exec </dev/null
exec >/dev/null 2>&1
# Standard locations of boot files
SCRIPTS=beos/system/boot
SERVERS=beos/system/servers
# Set up the environment
export SAFEMODE=`/bin/safemode`
launchscript $SCRIPTS/SetupEnvironment
# Sets timezone etc.
runprog beos/bin/clockconfig
# Init Network
if [ "$SAFEMODE" != "yes" ]
then
launchscript $SCRIPTS/Netscript
fi
# Launch servers
# We must wait for the app_server and registrar to be ready
if [ "$SAFEMODE" != "yes" ]; then
launch $SERVERS/app_server picasso # launch app_server
else
launch $SERVERS/fake_app_server picasso
fi
launch $SERVERS/registrar _roster_thread_ # launch registrar
launch $SERVERS/debug_server # launch debug_server
if [ "$SAFEMODE" != "yes" ]; then
launch $SERVERS/syslog_daemon
# ToDo: the input_server is supposed to be started by the app_server
launch $SERVERS/input_server
fi
# Launch MiniTerminal or consoled depending on $SAFEMODE
if [ "$SAFEMODE" != "yes" ]; then
launch beos/apps/MiniTerminal
else
launch beos/bin/consoled
fi
# Check for daily saving time
# TODO to be launched when tracker and deskbar are launched
#launch beos/bin/dstcheck