mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 13:08:30 +04:00
procd: include hotplug rule fragments from drop-in dirs
The hotplug rules live in a single /etc/hotplug.json, so a package that needs a device node named, owned or grouped its own way has no way to contribute one; the alternatives are patching the shared file or falling back to a shell script under /etc/hotplug.d. Load /etc/hotplug.json.d/*.json from inside the device node branch, ahead of the built-in name rules, and /etc/hotplug-preinit.json.d/* at the end of the preinit script. Fragments are run in sorted order. A fragment that creates a node keeps it: the generic rule below still runs, but its mknod() fails with EEXIST and leaves the node alone. This is done in preparation for deprecating some of the subtarget-wide FEATURES flags, instead introducing feature-umbrella packages such as `video-support` and `audio-support` shipping the hotplug rule snippets and having all providers (ie. kmods) and users depend on them. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
1 parent
3ee26fd417
commit
ffbd82ed6c
3 files changed
+8
-5
No files matched your search
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||
PKG_MIRROR_HASH:=b193107814e7b378fcbe519749aa1d92994f6d1cbc0c25faf0833f6b46811785
|
||||
PKG_SOURCE_DATE:=2026-09-26
|
||||
PKG_SOURCE_VERSION:=a6f9ffd4becffac99adf7368b26dde537c721f6f
|
||||
PKG_MIRROR_HASH:=6d336595493088058966b790837db75c5f9aa8cf8dd9151e2d1d554152f19891
|
||||
PKG_SOURCE_DATE:=2026-09-27
|
||||
PKG_SOURCE_VERSION:=675942be0e25fd4a4abb030820de432c1dd37a0a
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
@@ -113,7 +113,8 @@ SECCOMP=$(if $(CONFIG_PACKAGE_procd-seccomp),1,0)
|
||||
CMAKE_OPTIONS += -DSECCOMP_SUPPORT=$(SECCOMP) -DUTRACE_SUPPORT=$(SECCOMP)
|
||||
|
||||
define Package/procd/install
|
||||
$(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/lib/functions
|
||||
$(INSTALL_DIR) $(1)/sbin $(1)/etc $(1)/etc/hotplug.json.d \
|
||||
$(1)/etc/hotplug-preinit.json.d $(1)/lib/functions
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{init,procd,askfirst,udevtrigger,upgraded} $(1)/sbin/
|
||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libsetlbf.so $(1)/lib
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
[ "if",
|
||||
[ "eq", "SUBSYSTEM", "button" ],
|
||||
[ "exec", "/etc/rc.button/failsafe" ]
|
||||
]
|
||||
],
|
||||
[ "include", "/etc/hotplug-preinit.json.d/*.json" ]
|
||||
]
|
||||
@@ -27,6 +27,7 @@
|
||||
[ "return" ]
|
||||
]
|
||||
],
|
||||
[ "include", "/etc/hotplug.json.d/*.json" ],
|
||||
[ "if",
|
||||
[ "regex", "DEVNAME", "^snd" ],
|
||||
[ "makedev", "/dev/%DEVNAME%", "0660", "audio" ]
|
||||
|
||||
Reference in new issue
Block a user