We add the necessary Makefile, hotplug, config, and init bits
so that p910nd daemon runs as user:group p910nd:lp by default.
This eliminates an unnecessary root daemon.
The hotplug script sets the permissions of the USB lp
device(s) to read-write owner and group and no access to
anyone else, and sets owner root, group lp.
This is allows sufficient privileges to p910nd
to do it's job.
(cherry-pick 932c76fa74
)
Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
13 lines
256 B
Bash
13 lines
256 B
Bash
#!/bin/sh
|
|
|
|
case "$ACTION" in
|
|
add)
|
|
[ -n "${DEVNAME}" ] && [ "${DEVNAME##usb/lp*}" = "" ] && {
|
|
chmod 660 /dev/"$DEVNAME"
|
|
chgrp lp /dev/"$DEVNAME"
|
|
}
|
|
;;
|
|
remove)
|
|
# device is gone
|
|
;;
|
|
esac
|