[EMAIL PROTECTED] wrote:
>[...]
> The only pb is the /sys/.../pvrusb2/... owner is root. That is why I need udev
> to change the permission.
I just started playing with the sysfs interface, and I tried the following
approach for changing the permissions. Each time a video device is added
(any video device) udev runs the following script that adds group-write
permissions to the entire /sys/class/pvrusb2 tree.
#!/bin/sh
GROUP=video
CLASSDIR=/sys/class/pvrusb2
if [ "$ACTION" = "add" -a -d $CLASSDIR ]; then
GLOB=$CLASSDIR/*/
chgrp -R $GROUP $GLOB
find $GLOB -perm -u+w -print | xargs chmod g+w
fi
Not very elegant since it doesn't care about which device was attached,
but it works.
--
Bjorn Danielsson <[EMAIL PROTECTED]>
_______________________________________________
pvrusb2 mailing list
[email protected]
http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2