I've been trying to debug this myself too, and actually thought like in
bug #506995 that portmap was running twice, since it would be started from
/etc/rcS.d/S40networking (which kicks /etc/network/if-up.d/nfsmount.sh)
and also from /etc/rcS.d/S43portmap.
So I disabled the rcS.d portmap and nfs-common since the nfsmount.sh
script would start them, but then I still had the problem!
As far as I can tell now, /etc/init.d/portmap does:
pid=$( pidofproc portmap )
The $() starts a new process, and pidof -o %PPID uses this as parent pid.
But the /etc/init.d/portmap script is also running, and recognized, making
the pidof program return a of the init.d script.
I've fix it like this, but you're welcome to make your own conclusions and
fixes :)
--- /etc/init.d/portmap.old 2008-11-28 22:49:01.359743640 +0100
+++ /etc/init.d/portmap 2008-11-28 22:49:07.680869696 +0100
@@ -30,8 +30,8 @@
case "$1" in
start)
log_begin_msg "Starting portmap daemon..."
- pid=$( pidofproc portmap )
- if [ -n "$pid" ] ; then
+ pidofproc portmap >/dev/null
+ if [ "$?" = 0 ] ; then
log_begin_msg "Already running."
log_end_msg 0
exit 0
Since I don't know of a way to capture the output in a variable without
using $() or ``, I let it check the return value of pidofproc.
John
--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
[John van der Kamp]
> As far as I can tell now, /etc/init.d/portmap does:
> pid=$( pidofproc portmap )
> The $() starts a new process, and pidof -o %PPID uses this as parent pid.
> But the /etc/init.d/portmap script is also running, and recognized, making
> the pidof program return a of the init.d script.
Sound to me like the new behaviour of pidofproc is the source of your
problem.
> I've fix it like this, but you're welcome to make your own
> conclusions and fixes :)
Right. This make me conclude that the problem is with portmap and
lsb-base. Reassigning to portmap.
Happy hacking,
--
Petter Reinholdtsen
Hello All,
Please test if portmap 6.0-9 fixes this bug.
Thank you,
Aníbal
> Please test if portmap 6.0-9 fixes this bug.
No. This does not solve #482817 for me.
--
regards Thomas
> Please test if portmap 6.0-9 fixes this bug.
Hi,
I had the same problem as above. When /etc/rcS.d/S40networking was
executed at boot, he tried to start the portmap daemon, but did not
because he thought it was already running. And then he tried to start
"NFS common utilities" / statd and that failed.
But, I tried portmap 6.0-9 and that did solve the bug for me.
The false message about portmap is already running is gone, and he now
start portmap.
Regards,
Vidar Hoel
Best regards, Mikko