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:
Armijn Hemel 2006-03-10 15:05:22 +00:00
parent 6562861ba4
commit 9159ca026d
2 changed files with 10 additions and 2 deletions

View File

@ -42,14 +42,20 @@ start() {
# launch all preferred dependencies
#start_softdeps
# launch our own program
startService
# if successful, then register
register
}
stop() {
echo "stopping $prog"
# 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
fi
# stop our own program
stopService
unregister
}
register() {
@ -62,7 +68,7 @@ unregister() {
status() {
# are we running? If so, report
if test -a $STATDIR/$prog; then
if test -a $STATEDIR/$prog; then
echo "running"
else
echo "stopped"

View File

@ -27,6 +27,8 @@ startService()
stopService()
{
echo -n "Stopping $prog:"
kill `cat /var/run/syslogd.pid`
kill `cat /var/run/klogd.pid`
}
reloadService()