Silvan Calarco
cf72f9c3ae
added -common subpackage for multiarch library cohexistence [release 2.5.5.1-1mamba;Thu Dec 11 2014]
33 lines
1.0 KiB
Bash
33 lines
1.0 KiB
Bash
#!/bin/bash
|
|
# $Id: usbcam.group 6766 2003-09-16 16:42:44Z hun $
|
|
#
|
|
# /etc/hotplug/usb/usbcam
|
|
#
|
|
# Sets up newly plugged in USB camera so that only members of the
|
|
# group
|
|
|
|
GROUP=camera
|
|
|
|
# can access it from user space. (Replace camera with the name of the
|
|
# group you want to have access to the cameras.)
|
|
#
|
|
# Note that for this script to work, you'll need all of the following:
|
|
# a) a line in the file /etc/hotplug/usermap that corresponds to the
|
|
# camera you are using. You can get the correct lines for all cameras
|
|
# supported by libgphoto2 by running "print-usb-usermap".
|
|
# b) a group "camera" where all users allowed access to the
|
|
# camera are listed
|
|
# c) a Linux kernel supporting hotplug and usbdevfs
|
|
# d) the hotplug package (http://linux-hotplug.sourceforge.net/)
|
|
#
|
|
# In the usermap file, the first field "usb module" should be named
|
|
# "usbcam" like this script.
|
|
#
|
|
|
|
if [ "${ACTION}" = "add" ] && [ -e "${DEVNAME}" ]
|
|
then
|
|
chmod o-rwx "${DEVNAME}"
|
|
chgrp "${GROUP}" "${DEVNAME}"
|
|
chmod g+rw "${DEVNAME}"
|
|
fi
|