remove hardcoding of system.conf path in various service calls

This commit is contained in:
David van Moolenbroek 2010-09-10 09:22:22 +00:00
parent 6b902492ae
commit d29833c5aa
5 changed files with 6 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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" ]

View file

@ -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" ]

View file

@ -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) {