Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
usb-camera
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Thu Sep 15, 2005 12:01 pm    Post subject: usb-camera Reply with quote

Ho modificato uno script (preso da quello per l'usb scanner che stà nel wiki di gentoo) e l'ho adattato per la fotocamera digitale per il ripristino dei permessi
Code:
#!/sbin/runscript

depend() {
       need modules
       after coldplug
}

scan_proc() {


       vendor=040a
       product=0510
       group=video
       line=`lsusb|grep ${vendor}|grep ${product}`
       bus=`lsusb|grep 040a |grep 0510 |awk '{print $2}'`
       device=`lsusb|grep 040a|grep 0510|awk '{print $4}'|tr ":" " "`
       cd /proc/bus/usb/$bus
}

start() {
       scan_proc
       if [ ! "${bus}" = "" ]; then
         ebegin "Setting User-Rights for USB-Camera at bus ${bus}, device ${device}"
         chown root:${group} ${device}
         chmod g+w  ${device}
       else
         ebegin "USB-Camera not connected"
       fi
       eend $?
}

stop() {
       scan_proc
       if [ ! "${bus}" = "" ]; then
         ebegin "Setting USB-Camera Rights back to default"
         chown root:root ${device}
         chmod g-w  ${device}
       else
         ebegin "USB-Camera is not connected - stopping service"
       fi
       eend $?
}

restart() {
       svc_stop
       svc_start
}

ora devo fare /etc/init.d/usbcamera restart ogni volta che disinserisco e reinserisco la fotocamera per dare al device i giusti permessi... c'è un file (ho già provato /etc/hotplug/usb/usbcamera) in cui posso dire di mettere il device sotto il gruppo video con chmod 770 ?
P.S. non uso PAM
_________________
C.
Back to top
View user's profile Send private message
Maxxer
Apprentice
Apprentice


Joined: 22 Apr 2005
Posts: 171
Location: LC

PostPosted: Thu Sep 15, 2005 1:56 pm    Post subject: Reply with quote

io ho fatto così per la chiavetta usb bluetooth

creato
/etc/udev/rules.d/rfcomm.rules
# rfcomm binds
KERNEL=="rfcomm*", NAME="%k", GROUP="users"

cosi' la crea con lo stesso nome dandogli il gruppo users

ciao
Back to top
View user's profile Send private message
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Sun Sep 18, 2005 1:02 pm    Post subject: Reply with quote

Come faccio a settare i permessi in modo definitivo?
dalla regole di udev? ma in che modo?
_________________
C.
Back to top
View user's profile Send private message
SilverXXX
l33t
l33t


Joined: 18 Sep 2004
Posts: 885

PostPosted: Sun Sep 18, 2005 7:36 pm    Post subject: Reply with quote

Dovrebbe essere in /etc/udev/permissions.d, basta modificare la riga dei permessi rifuardanti i device di quel tipo
_________________
about:mozilla
Back to top
View user's profile Send private message
Maxxer
Apprentice
Apprentice


Joined: 22 Apr 2005
Posts: 171
Location: LC

PostPosted: Wed Sep 21, 2005 1:49 pm    Post subject: Reply with quote

io ho creato un nuovo file in permissions.d con gli stessi identici permessi di quello di gentoo ma sto fetente non me lo considera :(

ho inserito semplicemente
Code:
rfcomm*:root:dialout:0660
Back to top
View user's profile Send private message
fabius
Guru
Guru


Joined: 29 Nov 2004
Posts: 525

PostPosted: Wed Sep 21, 2005 2:23 pm    Post subject: Reply with quote

SilverXXX wrote:
Dovrebbe essere in /etc/udev/permissions.d, basta modificare la riga dei permessi rifuardanti i device di quel tipo

/etc/udev/permissions.d non viene più preso in considerazione da un pezzo (con le ultime versioni stabili di udev), tutte le configurazioni vanno in /etc/udev/rules.d/*.rules
Back to top
View user's profile Send private message
SilverXXX
l33t
l33t


Joined: 18 Sep 2004
Posts: 885

PostPosted: Wed Sep 21, 2005 9:00 pm    Post subject: Reply with quote

ops :oops: me l'ero persa questa :D
_________________
about:mozilla
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum