nut/scripts/hotplug/libhidups.in

18 lines
442 B
Text
Raw Normal View History

2010-03-25 23:20:59 +00:00
#!/bin/sh
# This script changes the permissions and ownership of a USB device under
# /proc/bus/usb to grant access to this device to users in the nut group.
#
# Ownership is set to root.@RUN_AS_GROUP@, permissions are set to 0664.
#
# Arguments :
# -----------
# ACTION=[add|remove]
# DEVICE=/proc/bus/usb/BBB/DDD
# TYPE=usb
if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
chown root:@RUN_AS_GROUP@ "$DEVICE"
chmod 0664 "$DEVICE"
fi