FS#24070 - [fam] Initscript does not check correctly for a running rpcbind (makes initscript useless)

Attached to Project: Arch Linux
Opened by Tilman Blumenbach (Tblue) - Tuesday, 03 May 2011, 15:21 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 16 May 2011, 14:49 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 9
Private No

Details

Description:
With initscripts having been updated to 2011.04.1-2, it is no longer possible to start fam using its initscript. This is because it requires a running rpcbind -- if rpcbind is not running, the fam initscript tries to start it. This works fine, but the script then checks whether rpcbind has been started correctly and is running by checking the existence of /var/run/daemons/rpcbind. The initscripts update has moved the daemon status files to /run/daemons, making that check always fail.

Additional info:
* Package version: 2.7.0-14

Steps to reproduce:
Try to start fam using /etc/rc.d/fam start or rc start fam.

Proposed fix:
See attached patch. Use ck_daemon to check if rpcbind is running instead of hardcoding the path to its status file.
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Monday, 16 May 2011, 14:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  fam 2.7.0-15
Comment by Tom Gundersen (tomegun) - Tuesday, 03 May 2011, 17:37 GMT
This was an unintended consequence of the change in initscripts. The correct usage is to use ck_daemon/add_daemon/rm_daemon (as the patch does) and dont rely on the internal state of initscripts.

A workaround is to add a symlink /var/run/damons -> /run/daemons.
Comment by Flavio Coutinho da Costa (flaviocdc) - Tuesday, 03 May 2011, 20:46 GMT
Confirmed that the attached patch does solve the problem!
Comment by Tom Gundersen (tomegun) - Thursday, 05 May 2011, 10:27 GMT
I'm intending to create the mentioned symlink in the next release of initscripts to avoid these problems (but the bug should of course still be fixed).
Comment by Alexsandr Pavlov (kidoz) - Monday, 09 May 2011, 17:17 GMT
In /etc/rc.d/fam change:
- if [ ! -f /run/daemons/rpcbind ]; then
+ if [ ! -f /run/rpcbind ]; then

Comment by Tom Gundersen (tomegun) - Monday, 09 May 2011, 19:04 GMT
@Alexandr: Why do propose this change? I think there was never a version that looked for /run/daemons/rpcbind (which would have worked). The old version looked for /var/run/daemons/rpcbind, and the correct solution is the attached patch useng ck_daemon.

Loading...