make syslog work with our new start/stop scripts. It is still full of race
conditions and dependencies don't work yet, but it's a start svn path=/nixpkgs/trunk/; revision=5023
This commit is contained in:
parent
6562861ba4
commit
9159ca026d
@ -42,14 +42,20 @@ start() {
|
|||||||
# launch all preferred dependencies
|
# launch all preferred dependencies
|
||||||
#start_softdeps
|
#start_softdeps
|
||||||
# launch our own program
|
# launch our own program
|
||||||
|
startService
|
||||||
|
# if successful, then register
|
||||||
|
register
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
echo "stopping $prog"
|
||||||
# are we running? If so, then stop, otherwise, do nothing...
|
# are we running? If so, then stop, otherwise, do nothing...
|
||||||
if test -a $STATDIR/$prog = 0; then
|
if ! test -a $STATEDIR/$prog; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# stop our own program
|
# stop our own program
|
||||||
|
stopService
|
||||||
|
unregister
|
||||||
}
|
}
|
||||||
|
|
||||||
register() {
|
register() {
|
||||||
@ -62,7 +68,7 @@ unregister() {
|
|||||||
|
|
||||||
status() {
|
status() {
|
||||||
# are we running? If so, report
|
# are we running? If so, report
|
||||||
if test -a $STATDIR/$prog; then
|
if test -a $STATEDIR/$prog; then
|
||||||
echo "running"
|
echo "running"
|
||||||
else
|
else
|
||||||
echo "stopped"
|
echo "stopped"
|
||||||
|
@ -27,6 +27,8 @@ startService()
|
|||||||
stopService()
|
stopService()
|
||||||
{
|
{
|
||||||
echo -n "Stopping $prog:"
|
echo -n "Stopping $prog:"
|
||||||
|
kill `cat /var/run/syslogd.pid`
|
||||||
|
kill `cat /var/run/klogd.pid`
|
||||||
}
|
}
|
||||||
|
|
||||||
reloadService()
|
reloadService()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user