Bug 541402
| Summary: | uuidd initscript lsb compliance | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Yulia Kopkova <ykopkova> | |
| Component: | util-linux-ng | Assignee: | Karel Zak <kzak> | |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | low | |||
| Version: | 12 | CC: | dkovalsk, kzak | |
| Target Milestone: | --- | Keywords: | Reopened | |
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | util-linux-ng-2.17-4.fc13 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 565888 (view as bug list) | Environment: | ||
| Last Closed: | 2010-06-14 09:53:14 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 521669 | |||
|
Description
Yulia Kopkova
2009-11-25 19:18:24 UTC
Karel, I have tried util-linux-ng-2.17-3.fc13.x86_64
# service uuidd start ; echo $?
4
# touch /var/lock/subsys/uuidd
# service uuidd start ; echo $?
Starting uuidd: [ OK ]
0
Service does not start cause of this
start() {
...
[ -w $LOCKFILE ] || exit 4
$LOCKFILE is removed with stop()
Initscript should return code "1", when program is dead and /var/run pid file exists: # service uuidd start ; echo $? 0 # ls -l /var/run/uuidd/uuidd.pid -rw-r--r--. 1 uuidd uuidd 9 Feb 16 12:57 /var/run/uuidd/uuidd.pid # ps ax | grep uuidd 29852 ? Ss 0:00 /usr/sbin/uuidd 29901 pts/2 S+ 0:00 grep uuidd # kill -11 29852 # ls -l /var/run/uuidd/uuidd.pid -rw-r--r--. 1 uuidd uuidd 9 Feb 16 12:57 /var/run/uuidd/uuidd.pid # service uuidd status ; echo $? <--- If pid file exists it should return 1 not 2 uuidd dead but subsys locked 2 # touch /var/run/uuidd.pid # service uuidd status ; echo $? uuidd dead but pid file exists 1 Looks like it tries to check if /var/run/uuidd.pid exists not /var/run/uuidd/uuidd.pid (In reply to comment #2) > Service does not start cause of this > start() { > ... > [ -w $LOCKFILE ] || exit 4 > > $LOCKFILE is removed with stop() Fixed. Sorry, stupid bug. (In reply to comment #3) > Initscript should return code "1", when program is dead and /var/run pid > file exists: [...] > # service uuidd status ; echo $? <--- If pid file exists it should return 1 not > 2 > uuidd dead but subsys locked > 2 > > # touch /var/run/uuidd.pid > # service uuidd status ; echo $? > uuidd dead but pid file exists > 1 > > Looks like it tries to check if /var/run/uuidd.pid exists > not /var/run/uuidd/uuidd.pid Yes, it's necessary to call 'status' function from /etc/init.d/functions with option "-p $pidfile" if the pid file is not directly in the /var/run directory. Fixed. It would be nice to add a check() function (for example from cupsd initscript) and the hint about "status -p $pidfile" to the template at https://fedoraproject.org/wiki/Packaging/SysVInitScript Verified bugs are fixed with util-linux-ng-2.17-4.fc13.x86_64 Thank you, Karel |