Bug#962649: init-d-script: fix PIDFILE argument to status_of_proc

Trek trek00 at inbox.ru
Thu Jun 11 10:25:43 BST 2020

Package: sysvinit-utils
Version: 2.88dsf-59.3
Control: tags -1 patch

the fix for #822674 had a caveat, because status_of_proc cannot parse
options after the first non-option argument, as it uses getopts

a simple test, where /run/crond.pid contains a running pid:

  $ . /lib/lsb/init-functions
  $ status_of_proc -p /run/crond.pid /non/existant/filename name
  [ ok ] name is running.
  $ status_of_proc /non/existant/filename name -p /run/crond.pid
  [FAIL] name is not running ... failed!

usually it works because it checks the command name only, omitting the
pidfile check at all:

  $ status_of_proc /usr/sbin/cron name -p /non/existant/filename
  [ ok ] name is running.

please see the attached patch

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sysvinit-status_of_proc.patch
Type: text/x-patch
Size: 442 bytes
Desc: not available
URL: <http://www.chiark.greenend.org.uk/pipermail/debian-init-diversity/attachments/20200611/8d7457d5/attachment.bin>

More information about the Debian-init-diversity mailing list