~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to scripts/hotplug/libhidups.in

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Quette
  • Date: 2004-05-28 13:10:01 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040528131001-yj2m9qcez4ya2w14
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# This file was installed by the libhid Debian package.
 
4
#
 
5
# This script changes the permissions and ownership of a USB device under
 
6
# /proc/bus/usb to grant access to this device to users in the nut group.
 
7
#
 
8
# Ownership is set to root.nut, permissions are set to 0660.
 
9
#
 
10
# Arguments :
 
11
# -----------
 
12
# ACTION=[add|remove]
 
13
# DEVICE=/proc/bus/usb/BBB/DDD
 
14
# TYPE=usb
 
15
 
 
16
if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
 
17
  chown root:@RUN_AS_USER@ "$DEVICE"
 
18
  chmod 0660 "$DEVICE"
 
19
fi