* 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
This commit is contained in:
+10
-20
@@ -4,28 +4,20 @@
|
|||||||
## Some functions used by the main script
|
## Some functions used by the main script
|
||||||
##
|
##
|
||||||
|
|
||||||
# launch <executable path> [thread to wait for]
|
# launch <executable path> [ <thread to wait for> [ <program args> ] ]
|
||||||
|
|
||||||
launch() {
|
launch() {
|
||||||
if [ -f "/boot/$1" ]
|
toLaunch="$1"
|
||||||
|
shift
|
||||||
|
toWaitFor="$1"
|
||||||
|
shift
|
||||||
|
if [ -f "/boot/$toLaunch" ]
|
||||||
then
|
then
|
||||||
"/boot/$1" &
|
"/boot/$toLaunch" $* &
|
||||||
[ "$2" != "" ] && waitfor "$2"
|
[ "$toWaitFor" != "" ] && waitfor "$toWaitFor"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
echo There is no "$1"
|
echo There is no "$toLaunch"
|
||||||
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"
|
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -133,7 +125,7 @@ fi
|
|||||||
|
|
||||||
# Launch Mail Daemon (if enabled on startup)
|
# Launch Mail Daemon (if enabled on startup)
|
||||||
if [ "$SAFEMODE" != "yes" ]; then
|
if [ "$SAFEMODE" != "yes" ]; then
|
||||||
launch_param_1 $SERVERS/mail_daemon -E
|
launch $SERVERS/mail_daemon "" -E
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for daily saving time
|
# Check for daily saving time
|
||||||
@@ -155,5 +147,3 @@ if [ -e $FRESH_INSTALL_INDICATOR_FILE ]; then
|
|||||||
# mimeset -all -f /boot/apps
|
# mimeset -all -f /boot/apps
|
||||||
rm $FRESH_INSTALL_INDICATOR_FILE
|
rm $FRESH_INSTALL_INDICATOR_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user