From: David van Moolenbroek Date: Fri, 10 Sep 2010 09:22:22 +0000 (+0000) Subject: remove hardcoding of system.conf path in various service calls X-Git-Tag: v3.1.8~8 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=d29833c5aa8da62e3b36a27675b2def2693a4ce9;p=minix.git remove hardcoding of system.conf path in various service calls --- diff --git a/commands/readclock/readclock.sh b/commands/readclock/readclock.sh index 97c94c3ef..ff23803bd 100644 --- a/commands/readclock/readclock.sh +++ b/commands/readclock/readclock.sh @@ -2,4 +2,4 @@ if [ $# -gt 0 ] then ARGS="-args $@" fi -/bin/service up /sbin/readclock.drv -config /etc/system.conf -period 5HZ -script /etc/rs.single $ARGS +/bin/service up /sbin/readclock.drv -period 5HZ -script /etc/rs.single $ARGS diff --git a/commands/swifi/run_swifi b/commands/swifi/run_swifi index 8174831c8..0d5ae99e3 100644 --- a/commands/swifi/run_swifi +++ b/commands/swifi/run_swifi @@ -46,7 +46,7 @@ one_round() # Start our own driver. service down $LABEL sleep 10 # Allow driver to die -service up $EXE -script `pwd`/rs.restart_imm -config /etc/system.conf -period 3HZ +service up $EXE -script `pwd`/rs.restart_imm -period 3HZ i=0 i=4000 diff --git a/commands/swifi/run_t1 b/commands/swifi/run_t1 index 33f6b12d4..cae9cb4ef 100755 --- a/commands/swifi/run_t1 +++ b/commands/swifi/run_t1 @@ -103,7 +103,7 @@ esac # Start our own driver. service down $LABEL sleep 2 # Allow driver to die -service up $EXE -script `pwd`/rs.restart_imm -config /etc/system.conf -period 3HZ $DEV +service up $EXE -script `pwd`/rs.restart_imm -period 3HZ $DEV i=0 while [ $i -lt "$count" ] diff --git a/commands/swifi/run_t2 b/commands/swifi/run_t2 index d37bbf61a..4bce2aeaa 100755 --- a/commands/swifi/run_t2 +++ b/commands/swifi/run_t2 @@ -123,7 +123,7 @@ esac # Start our own driver. service down $LABEL sleep 10 # Allow driver to die -service up $EXE -script `pwd`/rs.restart_imm -config /etc/system.conf -period 3HZ +service up $EXE -script `pwd`/rs.restart_imm -period 3HZ i=0 while [ $i -lt "$count" ] diff --git a/lib/libc/other/_mount.c b/lib/libc/other/_mount.c index 952963a50..8c473ce8b 100644 --- a/lib/libc/other/_mount.c +++ b/lib/libc/other/_mount.c @@ -91,13 +91,12 @@ int mountflags; } if(strlen(_PATH_SERVICE)+strlen(path)+strlen(label)+ - strlen(_PATH_SYSTEM_CONF)+strlen(args)+50 >= sizeof(cmd)) { + strlen(args)+50 >= sizeof(cmd)) { errno = E2BIG; return -1; } - sprintf(cmd, _PATH_SERVICE " %sup %s -label '%s' -config " _PATH_SYSTEM_CONF - " -args '%s%s'", + sprintf(cmd, _PATH_SERVICE " %sup %s -label '%s' -args '%s%s'", reuse ? "-r ": "", path, label, args[0] ? "-o " : "", args); if((r = system(cmd)) != 0) {