OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by aaronjg - 18.08.2020

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

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing