Files
libgphoto2/packaging/usbcam.group
Hans Ulrich Niedermann 2170e99592 2001-10-21 Hans Ulrich Niedermann <gp@n-dimensional.de>
* packages/usbcam.group: added. linux-hotplug script
	* packages/usbcam.console: added. linux-hotplug script
	* packages/Makefile.am: added.
	* packages/.cvsignore: added.
	* gphoto.spec.in: simplified a bit (only gphoto and
	  gphoto-devel, no lib* packages any more). added hotplug support.
	* configure.in: added packaging/
	* Makefile.am: added packaging/, added .tar.bz2 dist support


git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2695 67ed7778-7388-44ab-90cf-0a291f65f57c
2001-10-22 17:43:56 +00:00

27 lines
844 B
Bash
Executable File

#!/bin/bash
# $Id$
#
# /etc/hotplug/usb/usbcam
#
# Sets up newly plugged in USB camera so that group "camera"
# can access it from user space
#
# 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 gphoto2 by running "gphoto2 --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" ] && [ -f "${DEVICE}" ]
then
chgrp camera "${DEVICE}"
chmod g+rw "${DEVICE}"
fi