[FS#3291] procd gives warning when called outside an init script

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Mon Aug 17 23:46:24 EDT 2020


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - aaronjg (aaronjg) 

Attached to Project - OpenWrt/LEDE Project
Summary - procd gives warning when called outside an init script
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - The documentation here: https://openwrt.org/docs/guide-developer/procd-init-scripts suggests that you can use procd outside of init scripts.:

>>>  Note You can also send signals to named procd services from outside initscripts. Simply load the procd functions and send the signal as before.

>>> #!/bin/sh
. /lib/functions/procd.sh
procd_send_signal service_name [instance_name] [signal]

However, when you import the procd like this, the script shows an error when it calls 'basename' trying to obtain the procd lock.   

   # cat /tmp/test.sh 
   
   #!/bin/sh
   set -x
   . /lib/functions/procd.sh

   # /tmp/test.sh 2>&1|grep basename -C2
   + readlink 
   + local 'basescript='
   + basename
   BusyBox v1.30.1 () multi-call binary.
   
   Usage: basename FILE [SUFFIX]
   
   Strip directory path and .SUFFIX from FILE
`

Either procd.sh should be updated so that it can be called outside of init scripts without printing warnings, or the documentation should be updated to reflect that procd should not be called outside init scripts.

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3291

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list