mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 00:07:09 +04:00
scanner-support: add a package for the scanner group
Scanner access is granted per device: a USB scanner is matched by vendor and product id against a database of supported devices, which only the driver package has. There is no device class to write a generic hotplug rule against, and putting every USB device node into a group would grant far more than scanner access. Allocate the scanner group and nothing else, so the id is the same on every image, one package owns it, and scanner userspace has something to depend on. The rule granting access to a particular device stays with the driver package. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
1 parent
1ccaee3465
commit
d414369527
1 file changed
+19
@@ -141,6 +141,24 @@ define Package/printer-support/install
|
||||
$(call InstallFragment,$(1),55-printer.json)
|
||||
endef
|
||||
|
||||
define Package/scanner-support
|
||||
$(call Package/hardware-support/Default)
|
||||
TITLE:=Scanner device support
|
||||
USERID:=:scanner=47
|
||||
endef
|
||||
|
||||
define Package/scanner-support/description
|
||||
Feature gate for scanners. Allocates the scanner group, so that the id
|
||||
is the same on every image and one package owns it. Ships no hotplug
|
||||
rule: a USB scanner is matched by vendor and product id against a
|
||||
database of supported devices, which only the driver package has, so
|
||||
the rule granting access to a particular scanner stays there.
|
||||
endef
|
||||
|
||||
define Package/scanner-support/install
|
||||
$(INSTALL_DIR) $(1)
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
@@ -157,3 +175,4 @@ $(eval $(call BuildPackage,input-support))
|
||||
$(eval $(call BuildPackage,dvb-support))
|
||||
$(eval $(call BuildPackage,kvm-support))
|
||||
$(eval $(call BuildPackage,printer-support))
|
||||
$(eval $(call BuildPackage,scanner-support))
|
||||
Reference in new issue
Block a user