[Pkg-net-snmp-devel] Bug#932978:

Stephane Lapie stephane.lapie at asahinet.com
Fri Aug 7 08:57:07 BST 2020


Hello,

Also running Debian Buster with sysvinit, and I stumbled upon this same
issue.
After a bit of debugging, my understanding is that the root cause lies
here, in /lib/init/init-d-script :
--- /lib/init/init-d-script.old 2020-08-07 16:50:41.544757853 +0900
+++ /lib/init/init-d-script.old 2020-08-07 16:50:41.736755786 +0900
@@ -127,10 +127,12 @@
  [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
  call do_stop_cmd
  call do_start_cmd
- case "$?" in
+ result=$?
+ case "$result" in
  0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
  2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
  esac
+ return $result
 }

 do_force_reload() {

The return code for the whole function ends up being the test of verbosity,
which means it fails if we are not running this from a terminal.

This should have pretty widespread impact, but I guess it is especially
obvious in snmpd because it is using the new style whereas most programs
using an init script are still doing their argument parsing by themselves.

The above patch assumes the initial intent was to report the status of
failure/success of the start command.

Regards,
-- 
ラピー ステファン Lapie Stephane
株式会社朝日ネット システム基盤部
〒104-0061 東京都中央区銀座4-12-15 歌舞伎座タワー21F
E-MAIL: stephane.lapie at asahinet.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-net-snmp-devel/attachments/20200807/e42bbaf7/attachment.html>


More information about the Pkg-net-snmp-devel mailing list