Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-testing > by-pkgid > 0b5cd65b30ee4fbf86b4ed052caac381 > files > 2

nut-server-2.6.2-1mdv2010.2.x86_64.rpm

#!/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.ups, 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:ups "$DEVICE"
  chmod 0664 "$DEVICE"
fi