[openwrt/openwrt] procd: add missing dependency and fix empty mount triggers
LEDE Commits
lede-commits at lists.infradead.org
Sun Aug 15 10:09:42 PDT 2021
dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5c13177c55d068dec3e58f8f37c1c78502f73d3d
commit 5c13177c55d068dec3e58f8f37c1c78502f73d3d
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Aug 15 17:41:59 2021 +0100
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 at makrotopia.org>
---
package/system/procd/Makefile | 2 +-
package/system/procd/files/procd.sh | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index e55d7755eb..98f1ed1775 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -90,7 +90,7 @@ endef
define Package/uxc
SECTION:=base
CATEGORY:=Base system
- DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd
+ DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd +rpcd
TITLE:=OpenWrt container management
MAINTAINER:=Daniel Golle <daniel at makrotopia.org>
endef
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 14314bec95..3549a5a914 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -394,11 +394,15 @@ procd_get_mountpoints() {
}
_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_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() {
More information about the lede-commits
mailing list