tpm2-abrmd: don't test if the binary exists in the init script
authorCarlos Santos <casantos@datacom.ind.br>
Mon, 16 Apr 2018 02:29:40 +0000 (23:29 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 16 Apr 2018 05:34:59 +0000 (07:34 +0200)
The test doesn't make sense. Buildroot installs both abrmd and its init
script as part of the same package. But if it ever happens for some
reason, the error message from start-stop-daemon should be pretty clear.

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

index 3db5e6fa1d22aa0973e8f61dd1a154c6cd690de7..d54c220c04307c1b9c8569f3ed1739b4d0ca9c4d 100755 (executable)
@@ -3,14 +3,10 @@
 my_name="$0"
 
 check_required_files() {
-       [ -x "$1" ] || {
+       [ -f "$1" ] || {
                echo "$my_name: $1 is missing"
                exit 1
        }
-       [ -z "$2" ] || [ -f "$2" ] || {
-               echo "$my_name: $2 is missing"
-               exit 1
-       }
 }
 
 check_device() {
@@ -50,7 +46,7 @@ stop() {
        echo "OK"
 }
 
-check_required_files /usr/sbin/tpm2-abrmd /etc/dbus-1/system.d/tpm2-abrmd.conf
+check_required_files /etc/dbus-1/system.d/tpm2-abrmd.conf
 
 # defaults
 DAEMON_OPTS="--tcti=device --logger=syslog --max-connections=20 --max-transient-objects=20 --fail-on-loaded-trans"