commit 2fd4ea713546ef0cb9f67ee7853e9b1d01f64071 Author: Nils Philippsen AuthorDate: Fri Aug 31 15:54:01 2012 +0200 Commit: Nils Philippsen CommitDate: Fri Aug 31 15:54:01 2012 +0200 patch: udev Squashed commit of the following: commit 99a4a33bd297f5b475ac610cf2d51385893596b9 Author: Nils Philippsen Date: Fri Aug 31 15:51:55 2012 +0200 adapt generated udev rules for Fedora diff --git a/tools/sane-desc.c b/tools/sane-desc.c index 7bbd012..9447cb8 100644 --- a/tools/sane-desc.c +++ b/tools/sane-desc.c @@ -56,9 +56,9 @@ #define COLOR_NEW "\"#F00000\"" #define COLOR_UNKNOWN "\"#000000\"" -#define DEVMODE "0664" +#define DEVMODE "0644" #define DEVOWNER "root" -#define DEVGROUP "scanner" +#define DEVGROUP "root" #ifndef PATH_MAX # define PATH_MAX 1024 @@ -3543,7 +3543,8 @@ print_udev (void) } printf("\n# The following rule will disable USB autosuspend for the device\n"); - printf("ENV{libsane_matched}==\"yes\", RUN+=\"/bin/sh -c 'if test -e /sys/$env{DEVPATH}/power/control; then echo on > /sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level; then echo on > /sys/$env{DEVPATH}/power/level; fi'\"\n"); + printf("ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n"); + printf("ENV{libsane_matched}==\"yes\", TEST!=\"power/control\", TEST==\"power/level\", ATTR{power/level}=\"on\"\n"); printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");