umdns: add check for seccomp list
authorJan Pavlinec <jan.pavlinec@nic.cz>
Fri, 27 Nov 2020 13:49:43 +0000 (14:49 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 30 Nov 2020 10:38:13 +0000 (10:38 +0000)
This should fix an issue when user have a router with enabled seccomp
and tries to run umdns package which was build with SDK with disabled
seccomp support.

Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
package/network/services/umdns/Makefile
package/network/services/umdns/files/umdns.init

index dc032af31b4edd7ea567d45141d805c7731bf155..41945ce0079a6969a443e7225d831942d7905f19 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=umdns
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
 PKG_SOURCE_PROTO:=git
index c0b8cedd79b50b4aaed0539f8bc7fee533f8acaa..1ae1cccb039ca33b35f0abb88a6896b308075f9d 100644 (file)
@@ -33,7 +33,7 @@ start_service() {
 
        procd_open_instance
        procd_set_param command "$PROG"
-       procd_set_param seccomp /etc/seccomp/umdns.json
+       [ -f /etc/seccomp/umdns.json ] && procd_set_param seccomp /etc/seccomp/umdns.json
        procd_set_param respawn
        procd_open_trigger
        procd_add_config_trigger "config.change" "umdns" /etc/init.d/umdns reload