up()
{
service=$1
- args=$2
+ shift
# Function to dynamically start a system service
echo -n " $service"
- command="/sbin/$service $args"
- eval service up $command
+ service up /sbin/$service "$@"
}
while getopts 'saf' opt
# Start crucial system services. The floppy driver *must* be loaded
# first, as it needs memory below 16MB in order to do ISA DMA.
if [ ! "`sysenv label`" = "FLOPPY" ]
- then up floppy "-dev /dev/fd0 -period 5HZ"
- else up at_wini "-dev /dev/c0d0 -period 5HZ"
+ then up floppy -dev /dev/fd0 -period 5HZ
+ else up at_wini -dev /dev/c0d0 -period 5HZ
fi
- up is "-period 5HZ"
- up cmos "-dev /dev/cmos -period 5HZ"
+ up is -period 5HZ
+ up cmos -dev /dev/cmos -period 5HZ
echo .
# Set timezone.
up()
{
service=$1
- args=$2
+ shift
# Function to dynamically start a system service
# Service is not disabled. Try to bring it up.
echo -n " $service"
- command="/usr/sbin/$service $args"
- eval service up $command
+ service up /usr/sbin/$service "$@"
}
case $action in
# Start servers and drivers set at the boot monitor.
echo -n "Starting services:"
- up random "-dev /dev/random -period 3HZ"
+ up random -dev /dev/random -period 3HZ
# load random number generator
if [ -f $RANDOM_FILE ]
if grep " $driver " /etc/inet.conf > /dev/null 2>&1
then
eval arg=\$${driver}_arg
- up $driver "$arg -period 5HZ"
+ if [ ! -z "$arg" ]; then arg="-args \"$arg\""; fi
+ eval up $driver $arg -period 5HZ
fi
done
- up inet "-period 3HZ"
- up printer "-dev /dev/lp -period 10HZ"
+ up inet
+ up printer -dev /dev/lp -period 10HZ
echo .
# Network initialization.