Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > a143ce14dc833d1c8c723579497d3753 > files > 2

nut-server-2.4.3-3mdv2010.1.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