kopia lustrzana https://gitlab.com/sane-project/backends
Group commands and add conditionals
rodzic
0d0c03ab68
commit
6b1b071b77
|
@ -9,10 +9,10 @@ case $DEVCLASS in
|
|||
ugen*)
|
||||
BUSNAME=$(usbdevs -vv | egrep "Controller|$DEVNAME\$" | grep -B 1 "$DEVNAME\$" | awk -F'[ :]' '/^Controller/ { print $2 }')
|
||||
echo $BUSNAME > /var/run/${DEVNAME}.bus
|
||||
chown _cups:_saned /dev/"$DEVNAME".*
|
||||
chown _cups:_saned /dev/"$BUSNAME"
|
||||
chmod 660 /dev/"$DEVNAME".*
|
||||
chown 660 /dev/"$BUSNAME"
|
||||
chown _cups:_saned /dev/"$DEVNAME".* &&
|
||||
chmod 660 /dev/"$DEVNAME".*
|
||||
chown _cups:_saned /dev/"$BUSNAME" &&
|
||||
chown 660 /dev/"$BUSNAME"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
|
@ -9,11 +9,12 @@ case $DEVCLASS in
|
|||
ugen*)
|
||||
BUSNAME=$(cat /var/run/${DEVNAME}.bus)
|
||||
rm -f /var/run/${DEVNAME}.bus
|
||||
chown root:wheel /dev/"$DEVNAME".*
|
||||
chmod 600 /dev/"$DEVNAME".*
|
||||
test -n "$BUSNAME" &&
|
||||
chown root:wheel /dev/"$BUSNAME"
|
||||
chmod 600 /dev/"$BUSNAME"
|
||||
chown root:wheel /dev/"$DEVNAME".* &&
|
||||
chmod 600 /dev/"$DEVNAME".*
|
||||
test -n "$BUSNAME" && {
|
||||
chown root:wheel /dev/"$BUSNAME" &&
|
||||
chmod 600 /dev/"$BUSNAME"
|
||||
}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
Ładowanie…
Reference in New Issue