procd: add missing dependency and fix empty mount triggers

procd.sh:
 Instead of triggering on every mount.add event, there should be no
 mount trigger at all in case none of the directories passed to
 procd_add_*_mount_trigger() are located on a mountpoint configured in
 /etc/config/fstab.

uxc:
 add missing dependency on rpcd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2021-08-15 17:41:59 +01:00
parent 09fccdb99e
commit 5c13177c55
No known key found for this signature in database
GPG Key ID: 5A8F39C31C3217CA
2 changed files with 7 additions and 3 deletions

View File

@ -90,7 +90,7 @@ endef
define Package/uxc define Package/uxc
SECTION:=base SECTION:=base
CATEGORY:=Base system CATEGORY:=Base system
DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd +rpcd
TITLE:=OpenWrt container management TITLE:=OpenWrt container management
MAINTAINER:=Daniel Golle <daniel@makrotopia.org> MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
endef endef

View File

@ -394,11 +394,15 @@ procd_get_mountpoints() {
} }
_procd_add_restart_mount_trigger() { _procd_add_restart_mount_trigger() {
_procd_add_action_mount_trigger restart $(procd_get_mountpoints "$@") local mountpoints="$(procd_get_mountpoints "$@")"
[ "${mountpoints//[[:space:]]}" ] &&
_procd_add_action_mount_trigger restart $mountpoints
} }
_procd_add_reload_mount_trigger() { _procd_add_reload_mount_trigger() {
_procd_add_action_mount_trigger reload $(procd_get_mountpoints "$@") local mountpoints="$(procd_get_mountpoints "$@")"
[ "${mountpoints//[[:space:]]}" ] &&
_procd_add_action_mount_trigger reload $mountpoints
} }
_procd_add_raw_trigger() { _procd_add_raw_trigger() {