From 4b8941b10beeb1b4f48c5331c44622821ec6ff8e Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 25 Apr 2008 20:52:33 +0000 Subject: [PATCH] * Adjusted launch() to accept parameters for the launched program. * Removed launch_param_1(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25164 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- data/system/boot/Bootscript | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript index 79d9eca5c2..a49feb3d8d 100644 --- a/data/system/boot/Bootscript +++ b/data/system/boot/Bootscript @@ -4,28 +4,20 @@ ## Some functions used by the main script ## -# launch [thread to wait for] +# launch [ [ ] ] launch() { - if [ -f "/boot/$1" ] + toLaunch="$1" + shift + toWaitFor="$1" + shift + if [ -f "/boot/$toLaunch" ] then - "/boot/$1" & - [ "$2" != "" ] && waitfor "$2" + "/boot/$toLaunch" $* & + [ "$toWaitFor" != "" ] && waitfor "$toWaitFor" return 1 else - echo There is no "$1" - fi - return 0 -} - -launch_param_1() { - if [ -f "/boot/$1" ] - then - "/boot/$1" $2 & - [ "$3" != "" ] && waitfor "$3" - return 1 - else - echo There is no "$1" + echo There is no "$toLaunch" fi return 0 } @@ -133,7 +125,7 @@ fi # Launch Mail Daemon (if enabled on startup) if [ "$SAFEMODE" != "yes" ]; then - launch_param_1 $SERVERS/mail_daemon -E + launch $SERVERS/mail_daemon "" -E fi # Check for daily saving time @@ -155,5 +147,3 @@ if [ -e $FRESH_INSTALL_INDICATOR_FILE ]; then # mimeset -all -f /boot/apps rm $FRESH_INSTALL_INDICATOR_FILE fi - -