Browse Source

package/iwd: fix S40iwd check-package warnings

Fix fix S40iwd check-package warnings:

- package/iwd/S40iwd:3: Do not include path in DAEMON
  (https://nightly.buildroot.org/#adding-packages-start-script)

- package/iwd/S40iwd:4: Incorrect PIDFILE value
  (https://nightly.buildroot.org/#adding-packages-start-script)

Since this commit fixes lib_sysv.Variables check-package warnings
in S40iwd, this commit also removes the .checkpackageignore entry.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[Julien: remove lib_sysv.Variables in .checkpackageignore]
Signed-off-by: Julien Olivain <ju.o@free.fr>
Peter Seiderer 1 day ago
parent
commit
0343f03ce4
2 changed files with 7 additions and 7 deletions
  1. 1 1
      .checkpackageignore
  2. 6 6
      package/iwd/S40iwd

+ 1 - 1
.checkpackageignore

@@ -584,7 +584,7 @@ package/irqbalance/S13irqbalance Shellcheck lib_sysv.Indent lib_sysv.Variables
 package/irrlicht/0001-override-CPPFLAGS-CXXFLAGS-and-CFLAGS-in-Makefile.patch lib_patch.Upstream
 package/irrlicht/0001-override-CPPFLAGS-CXXFLAGS-and-CFLAGS-in-Makefile.patch lib_patch.Upstream
 package/irrlicht/0002-makefile-override-LDFLAGS-and-remove-obsolete-X11R6-.patch lib_patch.Upstream
 package/irrlicht/0002-makefile-override-LDFLAGS-and-remove-obsolete-X11R6-.patch lib_patch.Upstream
 package/iucode-tool/S00iucode-tool lib_sysv.Variables
 package/iucode-tool/S00iucode-tool lib_sysv.Variables
-package/iwd/S40iwd Shellcheck lib_sysv.Variables
+package/iwd/S40iwd Shellcheck
 package/janus-gateway/0001-disable-ssp.patch lib_patch.Upstream
 package/janus-gateway/0001-disable-ssp.patch lib_patch.Upstream
 package/kexec-lite/0001-clean-restart.patch lib_patch.Upstream
 package/kexec-lite/0001-clean-restart.patch lib_patch.Upstream
 package/keyutils/0001-fix-install-rule.patch lib_patch.Upstream
 package/keyutils/0001-fix-install-rule.patch lib_patch.Upstream

+ 6 - 6
package/iwd/S40iwd

@@ -1,16 +1,16 @@
 #!/bin/sh
 #!/bin/sh
 
 
-DAEMON="/usr/libexec/iwd"
-PIDFILE="/var/run/iwd.pid"
+DAEMON="iwd"
+PIDFILE="/var/run/$DAEMON.pid"
 
 
 IWD_ARGS=""
 IWD_ARGS=""
 
 
-[ -r "/etc/default/iwd" ] && . "/etc/default/iwd"
+[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
 
 
 start() {
 start() {
-	printf "Starting iwd:"
+	printf 'Starting %s: ' "$DAEMON"
 	mkdir -p /tmp/iwd/hotspot
 	mkdir -p /tmp/iwd/hotspot
-	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "$DAEMON" \
+	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/libexec/$DAEMON" \
 		-- $IWD_ARGS
 		-- $IWD_ARGS
 	status=$?
 	status=$?
 	if [ "$status" -eq 0 ]; then
 	if [ "$status" -eq 0 ]; then
@@ -22,7 +22,7 @@ start() {
 }
 }
 
 
 stop() {
 stop() {
-	printf "Stopping iwd:"
+	printf 'Stopping %s: ' "$DAEMON"
 	start-stop-daemon -K -q -p "$PIDFILE"
 	start-stop-daemon -K -q -p "$PIDFILE"
 	status=$?
 	status=$?
 	if [ "$status" -eq 0 ]; then
 	if [ "$status" -eq 0 ]; then