clone 386469 -1 tags -1 =patch reassign -1 update-inetd retitle -1 update-inetd: no reason to restart inetd on service removal severity -1 important thanks
Discussing with Marco on IRC, it seems he's reluctant to have inetd running when no services are configured, but it's clear in any case that update-inted doesn't need to restart inetd on service removal/deactivation: a force-reload is always sufficient, because either inetd is running and a reload does what's expected, or inetd isn't running and there's no reason to start it. So attached is a patch that changes this aspect of update-inetd's behavior. It doesn't completely resolve the issues described here (as noted, the problem can occur on package configuration, just not on package removal), but is nevertheless correct in its own right. NMU on its way shortly to incoming with this change, per Marco's standing NMU policy for this package. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/
diff -Nru /tmp/kPrNSDnFv0/update-inetd-4.27/debian/changelog /tmp/Oys7lzOfbb/update-inetd-4.27/debian/changelog --- /tmp/kPrNSDnFv0/update-inetd-4.27/debian/changelog 2007-02-21 15:16:12.000000000 -0800 +++ /tmp/Oys7lzOfbb/update-inetd-4.27/debian/changelog 2007-03-11 18:09:39.000000000 -0700 @@ -1,3 +1,13 @@ +update-inetd (4.27-0.5) unstable; urgency=low + + * Non-maintainer upload. + * When called with --disable or --remove, call invoke-rc.d $inetd + force-reload instead of restart -- if inetd isn't running, there's no + reason that we should be restarting it in the process of *removing* + services from inetd.conf. + + -- Steve Langasek <[EMAIL PROTECTED]> Sun, 11 Mar 2007 17:52:56 -0700 + update-inetd (4.27-0.4) unstable; urgency=high * Non-maintainer upload. diff -Nru /tmp/kPrNSDnFv0/update-inetd-4.27/DebianNet.pm /tmp/Oys7lzOfbb/update-inetd-4.27/DebianNet.pm --- /tmp/kPrNSDnFv0/update-inetd-4.27/DebianNet.pm 2007-02-21 15:16:30.000000000 -0800 +++ /tmp/Oys7lzOfbb/update-inetd-4.27/DebianNet.pm 2007-03-11 18:42:30.000000000 -0700 @@ -153,7 +153,7 @@ die "Error installing new $inetdcf: $!\n"; chmod(0644, "$inetdcf"); - &wakeup_inetd; + wakeup_inetd(1); return(1); } @@ -192,7 +192,7 @@ die "Error installing new $inetdcf: $!\n"; chmod(0644, "$inetdcf"); - &wakeup_inetd; + wakeup_inetd(1); return(1); } @@ -222,7 +222,16 @@ } sub wakeup_inetd { + my($removal) = @_; my($pid); + my($action); + + if ($removal) { + $action = 'force-reload'; + } else { + $action = 'restart'; + } + if (open(P,"/var/run/inetd.pid")) { $pid=<P>; if (open(C,sprintf("/proc/%d/stat",$pid))) { @@ -235,7 +244,7 @@ $_ = glob "/etc/init.d/*inetd"; if (m/\/etc\/init\.d\/(.*inetd)/) { my $service = $1; - system("invoke-rc.d $service restart >/dev/null"); + system("invoke-rc.d $service $action >/dev/null"); } } return(1);