On Thu, Nov 23, 2006, Jørgen Hermanrud Fjeld wrote: > A colleague of mine, Håvard, found some problems in the rc script of > dhcpd and tftpd. The pid is not recorded when the daemon is started. > Therefore "rc stop" does not work. > By using pidof the pid is recorded, and "rc stop" works. > Here are the small patches: > > #### Patch for dhcpd-3.0.4-2.20061018 > --- rc.dhcpd.orig 2006-10-16 16:12:52.000000000 +0200 > +++ rc.dhcpd 2006-11-13 18:24:05.000000000 +0100 > @@ -55,6 +55,7 @@ > rcService dhcpd usable no && exit 0 > rcService dhcpd active yes && exit 0 > dhcpd_start $dhcpd_if > + pidof @l_prefix@/sbin/dhcpd > $dhcpd_pidfile > > %stop -u @l_susr@ > rcService dhcpd enable yes || exit 0 > #### End patch > > #### Patch for tftp-0.43-2.20061018 patch > --- rc.tftp.orig 2006-10-16 16:14:09.000000000 +0200 > +++ rc.tftp 2006-11-13 18:36:28.000000000 +0100 > @@ -40,6 +40,7 @@ > opts="$opts $tftp_flags" > fi > @l_prefix@/sbin/tftpd $opts -s $tftp_rootdir > + pidof @l_prefix@/sbin/tftpd > $tftp_pidfile > > %stop -u @l_susr@ > rcService tftp enable yes || exit 0 > #### End patch
For tftp you're right. There is definitely a bug in our package: our own pidfile handling code was accidentaly removed from the tftp.patch file during the last bugfix round on the package. This is now fixed (see http://cvs.openpkg.org/chngview?cn=32792) and pid file handling works fine again -- and especially without using pidof(1) as this is not a portable solution. But for dhcpd this confused me. Our dhcpd writes its pidfile fully by itself and in all of my tests OpenPKG's dhcpd starts, writes the pidfile and stops correctly by using the written pidfile. Are you really sure that this package also has this problem? If yes, you have to give me more details about your platform, etc., please. Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ The OpenPKG Project www.openpkg.org Developer Communication List openpkg-dev@openpkg.org