Startup script now checks if network driver is mentioned in inet.conf.

Also allowed disabling daemons (like services) with disable= parameter.
This commit is contained in:
Jorrit Herder 2005-08-04 16:45:29 +00:00
parent f784f76891
commit 40e9875fd6

View File

@ -10,6 +10,23 @@ case "$#:$1" in
exit 1 exit 1
esac esac
disabled()
{
service=$1
ifs="$IFS"; IFS=,
for name in `sysenv disable`
do
if [ "$name" = "$service" ]
then
IFS="$ifs"; unset ifs
return 0
fi
done
IFS="$ifs"; unset ifs
return 1
}
daemonize() daemonize()
{ {
# Function to start a daemon, if it exists. # Function to start a daemon, if it exists.
@ -21,6 +38,10 @@ daemonize()
do do
if [ -f "$dir/$1" ] if [ -f "$dir/$1" ]
then then
# check if this service is disabled at the boot monitor.
if disabled $name; then return; fi
echo -n " $name" echo -n " $name"
"$@" & "$@" &
return return
@ -37,14 +58,7 @@ up()
# Function to dynamically start a system service # Function to dynamically start a system service
# First check if this service is disabled at the boot monitor. # First check if this service is disabled at the boot monitor.
ifs="$IFS"; IFS=, if disabled $service; then return; fi
for name in `sysenv disable`
do
if [ "$name" = "$service" ]
then return
fi
done
IFS="$ifs"; unset ifs
# Service is not disabled. Try to bring it up. # Service is not disabled. Try to bring it up.
command="/usr/sbin/$service" command="/usr/sbin/$service"