This commit was manufactured by cvs2svn to create branch 'b3_1_1'.

This commit is contained in:
nobody 2005-10-21 19:37:31 +00:00
parent 7104974cb5
commit 3e5c23fed7
3 changed files with 18 additions and 12 deletions

13
etc/rc
View File

@ -16,10 +16,13 @@ up()
{ {
service=$1 service=$1
args=$2 args=$2
device=$3
# Function to dynamically start a system service # Function to dynamically start a system service
command="/sbin/$service"
if [ ! -z "$args" ]; then command="$command -args \"$args\""; fi
if [ ! -z "$device" ]; then command="$command -dev \"$device\""; fi
echo -n " $service" echo -n " $service"
command="/sbin/$service $args"
eval service up $command eval service up $command
} }
@ -52,11 +55,11 @@ start)
# Start crucial system services. The floppy driver *must* be loaded # Start crucial system services. The floppy driver *must* be loaded
# first, as it needs memory below 16MB in order to do ISA DMA. # first, as it needs memory below 16MB in order to do ISA DMA.
if [ ! "`sysenv label`" = "FLOPPY" ] if [ ! "`sysenv label`" = "FLOPPY" ]
then up floppy "-dev /dev/fd0 -period 5HZ" then up floppy "" /dev/fd0
else up at_wini "-dev /dev/c0d0 -period 5HZ" else up at_wini "" /dev/c0d0
fi fi
up is "-period 5HZ" up is ""
up cmos "-dev /dev/cmos -period 5HZ" up cmos "" /dev/cmos
echo . echo .
# Set timezone. # Set timezone.

View File

@ -6,7 +6,7 @@ if [ "$1" != start ]
then exit then exit
fi fi
service up $DRIVERS/rescue -dev /dev/rescue -args 128 -period 4HZ service up $DRIVERS/rescue -dev /dev/rescue -args 128
mkfs /dev/rescue || exit mkfs /dev/rescue || exit
mount /dev/rescue $RESCUE || exit mount /dev/rescue $RESCUE || exit
cp $DRIVERS/memory $RESCUE cp $DRIVERS/memory $RESCUE
@ -25,4 +25,4 @@ BIOS)
;; ;;
esac esac
cp $DRIVERS/$d $RESCUE/driver cp $DRIVERS/$d $RESCUE/driver
service rescue $RESCUE service rescue $RESCUE

View File

@ -56,6 +56,7 @@ up()
{ {
service=$1 service=$1
args=$2 args=$2
device=$3
# Function to dynamically start a system service # Function to dynamically start a system service
@ -63,8 +64,10 @@ up()
if disabled $service; then return; fi if disabled $service; then return; fi
# Service is not disabled. Try to bring it up. # Service is not disabled. Try to bring it up.
command="/usr/sbin/$service"
if [ ! -z "$args" ]; then command="$command -args \"$args\""; fi
if [ ! -z "$device" ]; then command="$command -dev \"$device\""; fi
echo -n " $service" echo -n " $service"
command="/usr/sbin/$service $args"
eval service up $command eval service up $command
} }
@ -78,7 +81,7 @@ start)
# Start servers and drivers set at the boot monitor. # Start servers and drivers set at the boot monitor.
echo -n "Starting services:" echo -n "Starting services:"
up random "-dev /dev/random -period 3HZ" up random "" /dev/random
# load random number generator # load random number generator
if [ -f $RANDOM_FILE ] if [ -f $RANDOM_FILE ]
@ -94,11 +97,11 @@ start)
if grep " $driver " /etc/inet.conf > /dev/null 2>&1 if grep " $driver " /etc/inet.conf > /dev/null 2>&1
then then
eval arg=\$${driver}_arg eval arg=\$${driver}_arg
up $driver "$arg -period 5HZ" up $driver "$arg"
fi fi
done done
up inet "-period 3HZ" up inet ""
up printer "-dev /dev/lp -period 10HZ" up printer "" /dev/lp
echo . echo .
# Network initialization. # Network initialization.