mwan3: don't trigger rpcd install hooks if rpcd not installed
authorAaron Goodman <aaronjg@stanford.edu>
Fri, 13 Nov 2020 18:08:14 +0000 (13:08 -0500)
committerAaron Goodman <aaronjg@stanford.edu>
Mon, 16 Nov 2020 16:23:10 +0000 (11:23 -0500)
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
net/mwan3/Makefile

index ec782a08953c4c1817eb3ca67f470c1d0793eae1..ecdd06f96a7daa36256f9f534cf7341f8b07cc67 100644 (file)
@@ -45,7 +45,7 @@ endef
 
 define Package/mwan3/postinst
 #!/bin/sh
-if [ -z "$${IPKG_INSTROOT}" ]; then
+if [ -z "$${IPKG_INSTROOT}" ] && [ -x /etc/init.d/rpcd ]; then
        /etc/init.d/rpcd restart
 fi
 exit 0
@@ -53,7 +53,7 @@ endef
 
 define Package/mwan3/postrm
 #!/bin/sh
-if [ -z "$${IPKG_INSTROOT}" ]; then
+if [ -z "$${IPKG_INSTROOT}" ] && [ -x /etc/init.d/rpcd ]; then
        /etc/init.d/rpcd restart
 fi
 exit 0