Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#14123 - [portmap] start-script writes an empty pidfile

Attached to Project: Arch Linux
Opened by Per Wigren (Tuxie) - Monday, 06 April 2009, 14:06 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 03 June 2009, 10:54 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

/etc/rc.d/portmap writes an empty pidfile instead if one with portmap's pid:

---SNIP---
PID=`pidof -o %PPID /sbin/portmap`
case "$1" in
start)
stat_busy "Starting Portmap"
[ -z "$PID" ] && /sbin/portmap
if [ $? -gt 0 ]; then
stat_fail
else
echo $PID > /var/run/portmap.pid
add_daemon portmap
stat_done
fi
;;
---SNIP---

When $PID get set, portmap isn't running and it isn't re-set after portmap is started. Thus "echo $PID > ..." writes nothing more than a newline.

A better solution would be to either replace "echo $PID" with "pidof -o %PPID /sbin/portmap", and/or set the $PID variable from that file.

The reason I report this as a bug even though the start-stop-script works by itself is that server monitoring applications like Monit require proper pidfiles.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Wednesday, 03 June 2009, 10:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  6.0-4

Loading...