remove hardcoding of system.conf path in various service calls
This commit is contained in:
parent
6b902492ae
commit
d29833c5aa
5 changed files with 6 additions and 7 deletions
|
@ -2,4 +2,4 @@
|
||||||
if [ $# -gt 0 ]
|
if [ $# -gt 0 ]
|
||||||
then ARGS="-args $@"
|
then ARGS="-args $@"
|
||||||
fi
|
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
|
||||||
|
|
|
@ -46,7 +46,7 @@ one_round()
|
||||||
# Start our own driver.
|
# Start our own driver.
|
||||||
service down $LABEL
|
service down $LABEL
|
||||||
sleep 10 # Allow driver to die
|
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=0
|
||||||
i=4000
|
i=4000
|
||||||
|
|
|
@ -103,7 +103,7 @@ esac
|
||||||
# Start our own driver.
|
# Start our own driver.
|
||||||
service down $LABEL
|
service down $LABEL
|
||||||
sleep 2 # Allow driver to die
|
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
|
i=0
|
||||||
while [ $i -lt "$count" ]
|
while [ $i -lt "$count" ]
|
||||||
|
|
|
@ -123,7 +123,7 @@ esac
|
||||||
# Start our own driver.
|
# Start our own driver.
|
||||||
service down $LABEL
|
service down $LABEL
|
||||||
sleep 10 # Allow driver to die
|
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=0
|
||||||
while [ $i -lt "$count" ]
|
while [ $i -lt "$count" ]
|
||||||
|
|
|
@ -91,13 +91,12 @@ int mountflags;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strlen(_PATH_SERVICE)+strlen(path)+strlen(label)+
|
if(strlen(_PATH_SERVICE)+strlen(path)+strlen(label)+
|
||||||
strlen(_PATH_SYSTEM_CONF)+strlen(args)+50 >= sizeof(cmd)) {
|
strlen(args)+50 >= sizeof(cmd)) {
|
||||||
errno = E2BIG;
|
errno = E2BIG;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(cmd, _PATH_SERVICE " %sup %s -label '%s' -config " _PATH_SYSTEM_CONF
|
sprintf(cmd, _PATH_SERVICE " %sup %s -label '%s' -args '%s%s'",
|
||||||
" -args '%s%s'",
|
|
||||||
reuse ? "-r ": "", path, label, args[0] ? "-o " : "", args);
|
reuse ? "-r ": "", path, label, args[0] ? "-o " : "", args);
|
||||||
|
|
||||||
if((r = system(cmd)) != 0) {
|
if((r = system(cmd)) != 0) {
|
||||||
|
|
Loading…
Reference in a new issue