Files
haiku-beta6/data/system/boot/Bootscript
T

82 lines
1.3 KiB
Plaintext
Raw Normal View History

## The system's main boot script.
##
## Some functions used by the main script
##
# launch <executable path> [thread to wait for]
2005-01-19 02:46:12 +00:00
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
}
2004-11-22 23:33:02 +00:00
# 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
2005-01-19 02:46:12 +00:00
# Standard locations of boot files
SCRIPTS=beos/system/boot
SERVERS=beos/system/servers
# Set up the environment
2004-11-25 18:39:09 +00:00
export SAFEMODE=`/bin/safemode`
launchscript $SCRIPTS/SetupEnvironment
2004-11-25 18:39:09 +00:00
# Sets timezone etc.
2004-11-22 23:33:02 +00:00
runprog beos/bin/clockconfig
2005-01-15 21:34:20 +00:00
# Launch servers
2005-01-19 02:46:12 +00:00
# We must wait for the app_server and registrar to be ready
2005-01-15 21:34:20 +00:00
#launch $SERVERS/app_server picasso # launch app_server
launch $SERVERS/registrar _roster_thread_ # launch registrar
2005-01-19 02:46:12 +00:00
if [ "$SAFEMODE" != "yes" ]; then
launch $SERVERS/syslog_daemon
fi
# Launch consoled (to be removed later - this starts the mini console)
launch beos/bin/consoled
2005-01-15 21:34:20 +00:00
2004-12-14 16:38:47 +00:00
# Check for daily saving time
# TODO to be launched when tracker and deskbar are launched
#launch beos/bin/dstcheck