From: Jorrit Herder Date: Fri, 21 Oct 2005 14:34:13 +0000 (+0000) Subject: Added periodic checks from RS to drivers. X-Git-Tag: v3.1.2a~563 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=7a7e680da79d3dc4e4d110a36709e770b448e33a;p=minix.git Added periodic checks from RS to drivers. --- diff --git a/etc/rc b/etc/rc index 61e542df7..9fd89f131 100755 --- a/etc/rc +++ b/etc/rc @@ -16,13 +16,10 @@ up() { service=$1 args=$2 - device=$3 # 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" + command="/sbin/$service $args" eval service up $command } @@ -55,11 +52,11 @@ start) # 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/fd0 - else up at_wini "" /dev/c0d0 + then up floppy "-dev /dev/fd0 -period 5HZ" + else up at_wini "-dev /dev/c0d0 -period 5HZ" fi - up is "" - up cmos "" /dev/cmos + up is "-period 5HZ" + up cmos "-dev /dev/cmos -period 5HZ" echo . # Set timezone. diff --git a/etc/rc.rescue b/etc/rc.rescue index 444542c45..d3b0e5260 100644 --- a/etc/rc.rescue +++ b/etc/rc.rescue @@ -6,7 +6,7 @@ if [ "$1" != start ] then exit fi -service up $DRIVERS/rescue -dev /dev/rescue -args 128 +service up $DRIVERS/rescue -dev /dev/rescue -args 128 -period 4HZ mkfs /dev/rescue || exit mount /dev/rescue $RESCUE || exit cp $DRIVERS/memory $RESCUE @@ -25,4 +25,4 @@ BIOS) ;; esac cp $DRIVERS/$d $RESCUE/driver -service rescue $RESCUE +service rescue $RESCUE diff --git a/etc/usr/rc b/etc/usr/rc index 389a1b40d..8ce67b975 100644 --- a/etc/usr/rc +++ b/etc/usr/rc @@ -56,7 +56,6 @@ up() { service=$1 args=$2 - device=$3 # Function to dynamically start a system service @@ -64,10 +63,8 @@ up() if disabled $service; then return; fi # 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" + command="/usr/sbin/$service $args" eval service up $command } @@ -81,7 +78,7 @@ start) # Start servers and drivers set at the boot monitor. echo -n "Starting services:" - up random "" /dev/random + up random "-dev /dev/random -period 3HZ" # load random number generator if [ -f $RANDOM_FILE ] @@ -97,11 +94,11 @@ start) if grep " $driver " /etc/inet.conf > /dev/null 2>&1 then eval arg=\$${driver}_arg - up $driver "$arg" + up $driver "$arg -period 5HZ" fi done - up inet "" - up printer "" /dev/lp + up inet "-period 3HZ" + up printer "-dev /dev/lp -period 10HZ" echo . # Network initialization.