]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
neard: don't test if the binary exists in the init script
authorCarlos Santos <casantos@datacom.ind.br>
Mon, 16 Apr 2018 02:29:28 +0000 (23:29 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 16 Apr 2018 05:34:44 +0000 (07:34 +0200)
The test doesn't make sense. It just exits without any error if the
binary doesn't exist, which is silly.

Replace the DAEMON variable, which was used only once, by the full path
of the binary file.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/neard/S53neard

index f515668389acb05972f81222ad709309987864f1..4fd4e0aad3d46c2db9925e5dd5819afea7305b12 100755 (executable)
@@ -4,15 +4,11 @@
 #
 
 NAME=neard
-DAEMON=/usr/libexec/nfc/$NAME
-
-# Exit gracefully if the package has been removed
-[ -x $DAEMON ] || exit 0
 
 case "$1" in
   start)
     printf "Starting $NAME: "
-    start-stop-daemon -S -q -p /var/run/${NAME}.pid -x $DAEMON -- -d '*'
+    start-stop-daemon -S -q -p /var/run/${NAME}.pid -x /usr/libexec/nfc/neard -- -d '*'
     echo "OK"
     ;;
   stop)