2004-11-03 19:36:40 +03:00
|
|
|
## 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
|
|
|
|
}
|
|
|
|
|
2004-11-23 02:33:02 +03:00
|
|
|
# runprog <executable path>
|
|
|
|
|
|
|
|
runprog() {
|
|
|
|
if [ -f "/boot/$1" ]
|
|
|
|
then
|
|
|
|
"/boot/$1"
|
|
|
|
return 1
|
|
|
|
else
|
|
|
|
echo There is no "$1"
|
|
|
|
fi
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2004-11-03 19:36:40 +03:00
|
|
|
##
|
|
|
|
## Main script starts here
|
|
|
|
##
|
|
|
|
|
|
|
|
# Set up stdin/out/err to nirvana
|
|
|
|
|
|
|
|
exec </dev/null
|
|
|
|
exec >/dev/null 2>&1
|
|
|
|
|
|
|
|
# Set up the environment
|
|
|
|
|
2004-11-25 21:39:09 +03:00
|
|
|
export SAFEMODE=`/bin/safemode`
|
|
|
|
|
2004-11-03 19:36:40 +03:00
|
|
|
SCRIPTS=beos/system/boot
|
|
|
|
launchscript $SCRIPTS/SetupEnvironment
|
|
|
|
|
2004-11-25 21:39:09 +03:00
|
|
|
# Sets timezone etc.
|
2004-11-23 02:33:02 +03:00
|
|
|
runprog beos/bin/clockconfig
|
|
|
|
|
2004-11-03 19:36:40 +03:00
|
|
|
# Launch consoled
|
|
|
|
launch beos/bin/consoled
|
2004-12-14 19:38:47 +03:00
|
|
|
|
|
|
|
# Check for daily saving time
|
|
|
|
# TODO to be launched when tracker and deskbar are launched
|
|
|
|
#launch beos/bin/dstcheck
|
|
|
|
|