Bug 217320

Summary: avahi init file does not clean properly after itself
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: avahiAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-01 18:17:39 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Michal Jaegermann 2006-11-26 19:46:18 EST
Description of problem:

In /etc/rc.d/init.d

# ./avahi-daemon start
Starting Avahi daemon:                                     [  OK  ]
# ./avahi-daemon status
Avahi daemon is running
# pgrep -f -l avahi-d
8900 avahi-daemon: running [dyna0.local]
8901 avahi-daemon: chroot helper process

So far so good.  But now

# ./avahi-daemon stop
Shutting down Avahi daemon:                                [  OK  ]
# cat /var/run/avahi-daemon/pid
8900
# ./avahi-daemon start
Starting Avahi daemon: Process 8900 died: No such process; removing PID file.
(/var/run/avahi-daemon//pid)
                                                           [  OK  ]

and similar stuff for './avahi-daemon restart', of course.

The issue is simple. /etc/rc.d/init.d/avahi-daemon script instead of
using 'killproc()' function is doing just '$AVAHI_BIN -k' and that leaves
behind a pid file for an already stopped process.

Another possibility - as '$AVAHI_BIN -D' clearly creates on its own 
/var/run/avahi-daemon/pid file then '$AVAHI_BIN -k' should take care
about cleaning it up on a succesful completion.

Version-Release number of selected component (if applicable):
avahi-0.6.11-6.fc6

How reproducible:
always
Comment 1 Michal Jaegermann 2006-12-01 18:17:39 EST
Does not happen with avahi-0.6.15-3.fc7.