Torna indietro   Hardware Upgrade Forum > Software > Linux, Unix, OS alternativi

Sony INZONE H6 Air: il primo headset open-back di Sony per giocatori
Sony INZONE H6 Air: il primo headset open-back di Sony per giocatori
Il primo headset open-back della linea INZONE arriva a 200 euro con driver derivati dalle cuffie da studio MDR-MV1 e un peso record di soli 199 grammi
Nutanix cambia pelle: dall’iperconvergenza alla piattaforma full stack per cloud ibrido e IA
Nutanix cambia pelle: dall’iperconvergenza alla piattaforma full stack per cloud ibrido e IA
Al .NEXT 2026 di Chicago, Nutanix ha mostrato quanto sia cambiata: una piattaforma software che gestisce VM, container e carichi di lavoro IA ovunque, dall’on-premise al cloud pubblico. Con un’esecuzione rapidissima sulle partnership e sulla migrazione da VMware
Recensione Xiaomi Pad 8 Pro: potenza bruta e HyperOS 3 per sfidare la fascia alta
Recensione Xiaomi Pad 8 Pro: potenza bruta e HyperOS 3 per sfidare la fascia alta
Xiaomi Pad 8 Pro adotta il potente Snapdragon 8 Elite all'interno di un corpo con spessore di soli 5,75 mm e pannello LCD a 144Hz flicker-free, per un tablet che può essere utilizzato con accessori dedicati di altissima qualità. Fra le caratteristiche esclusive, soprattutto per chi intende usarlo con la tastiera ufficiale, c'è la modalità Workstation di HyperOS 3, che trasforma Android in un sistema operativo con interfaccia a finestre
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 15-12-2004, 07:33   #1
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
automount penne usb con udev+hotplug

Il problema è il seguente: vorrei riuscire a fare in modo che, appena si inserisce una penna usb (o dispositivi simili) essa venga montata in una cartella creata sul momento, con nome "model - vendor" della periferica in questione. Cercando su google non sono riuscito a trovare niente (che usasse udev + hotplug), ma in compenso ho capito qualcosa:[list=1][*]Aggiungere in /etc/hotplug/usb/ uno script chiamato come il moduel che si occupa del device (dovrebbe essere usb-storage)[*]Lo script deve (credo) agire in base alle variabili ACTION (add o remove) e DEVPATH (che dovrebbe essere il device che è stato montato)[*]model e vendor si trovano tramite /sys o /proc/bus/usb/device[/list=1]Nessuno sa come fare ? (o lo ha già fatto)

ps. la mia distro è una gentoo con kernel 2.6.9-gentoo-r4
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 08:40   #2
The X
Senior Member
 
L'Avatar di The X
 
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
SE prendi il numero 15 d Linux Pratico c'e' un articolo esattamente su questo....

D contro t posso dire ke io l'ho provato e nn mi ha funzionato nel senso ke andava a metà (caricava tutto ma dentro /mnt/pendrive nn vedevo i miei files)...
__________________
Powered by Apple Macbook Pro Retina
The X è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 09:09   #3
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
è ancora in edicola?
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 09:12   #4
The X
Senior Member
 
L'Avatar di The X
 
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
Quote:
Originariamente inviato da SilverXXX
è ancora in edicola?
Boh, io mi sono abbonato x 1 anno e mi arriva a casa....

Al massimo, se nn lo trovo, fai 1 fischio ^_^
__________________
Powered by Apple Macbook Pro Retina
The X è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 09:35   #5
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
è già uscito il 18; dubito che qualcuno che conosco lo abbia comprato se mi fai il favore di postare un sunto dell'articolo ti ringrazio ( e magari lo metto a posto per farlo andare bene del tutto )
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 11:35   #6
Mory
Senior Member
 
Iscritto dal: Oct 1999
Città: Tra Como e Varese
Messaggi: 2803
prova con questo, ma devi sostituire 000/000/000 con quello che leggi nel file tmp/usb-storage-vars
la riga di mount del dispositivo usb deve essere presente nel file fstab con l'opzione sync.
A me nn funziona benissimo però almeno fa il mount in automatico. Prova tu, magari riesci a sistemarlo

#!/bin/bash
set > /tmp/usb-storage-vars
case "$ACTION" in
add)
case "$PRODUCT" in
000/000/000)
[ -e /dev/usbmp3 ] && rm /dev/usbmp3
mknod /dev/usbmp3 b 8 1
chmod 660 /dev/usbmp3
mkdir /mnt/usbmp3
sleep 2
mount /dev/usbmp3
echo "#!/bin/bash" > $REMOVER
echo "umount /dev/usbmp3" >> $REMOVER
echo "rm /dev/usbmp3" >> $REMOVER
echo "rmdir /mnt/usbmp3" >> $REMOVER
chmod 775 $REMOVER
;;
esac
;;
esac
Mory è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 12:57   #7
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Da quel che ho letto finora, non si deve tentare di creare il dev nello script ma usare quello che creano udev+hotplug (che dovrebbe essere in $DEVPATH). Avrei anche qualche problema nel prendere il nome del modello e del venditore, ma facendo il giusto "cat /purc/bus/usb/devices | grep " dovrei prendere entrambi, o almeno spero
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 15:10   #8
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Allora, ho rimediato qualcosa (ovviamente nnon è ancora funzionante, ma ho appena scritto qualcosa.....) ma mi sono trovato un problema che non so esattamente come aggirare: il sistema hotplug mi passa in DEVPATH la cartella in cui si trovano le informazioni (del tipo /sys/bus/usb/devices/1-1:2.0/) se è un dispositivo di massa, si trova la dir host + un numero (penso) da 1 a 9, dentro ad essa una cartella n:0:0:0, poi block e dentro i vari sda1, sda2 eccetera (alla fine la stringa è /sys/bus/usb/devices/1-1:2.0/host1/1:0:0:0/block/sda1/) da cui estrarre il dev sda1. Non c'è un modo più semplice per montare un dev sapendo solo fino a /sys/bus/usb/devices/1-1:2.0/ (perchè penso sarebbe uno spreco cercare tutti gli host*) ?

edit: mory scusa ma non me ne ero accorto, io volevo fare che montasse automaticamente le penne usb anche non presenti in fstab
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.

Ultima modifica di SilverXXX : 15-12-2004 alle 16:41.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 17:58   #9
Mory
Senior Member
 
Iscritto dal: Oct 1999
Città: Tra Como e Varese
Messaggi: 2803
Quote:
Originariamente inviato da SilverXXX
Allora, ho rimediato qualcosa (ovviamente nnon è ancora funzionante, ma ho appena scritto qualcosa.....) ma mi sono trovato un problema che non so esattamente come aggirare: il sistema hotplug mi passa in DEVPATH la cartella in cui si trovano le informazioni (del tipo /sys/bus/usb/devices/1-1:2.0/) se è un dispositivo di massa, si trova la dir host + un numero (penso) da 1 a 9, dentro ad essa una cartella n:0:0:0, poi block e dentro i vari sda1, sda2 eccetera (alla fine la stringa è /sys/bus/usb/devices/1-1:2.0/host1/1:0:0:0/block/sda1/) da cui estrarre il dev sda1. Non c'è un modo più semplice per montare un dev sapendo solo fino a /sys/bus/usb/devices/1-1:2.0/ (perchè penso sarebbe uno spreco cercare tutti gli host*) ?

edit: mory scusa ma non me ne ero accorto, io volevo fare che montasse automaticamente le penne usb anche non presenti in fstab
no problem, cambia il comando di mount

mount -t auto -o sync /dev/.... ecc.

dovrebbe andare senza riga nel fstab
Mory è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 18:38   #10
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Purtroppo è più complesso di quel che credevo; cmq posto una versione incompleta (e già abbastanza incasinata) tanto per darvi un'idea.
Allegati
File Type: gz prova.tar.gz (1.2 KB, 5 visite)
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 18:44   #11
Mory
Senior Member
 
Iscritto dal: Oct 1999
Città: Tra Como e Varese
Messaggi: 2803
Quote:
Originariamente inviato da SilverXXX
Purtroppo è più complesso di quel che credevo; cmq posto una versione incompleta (e già abbastanza incasinata) tanto per darvi un'idea.
cmq nel mount ti conviene usare sync altrimenti se stacchi senza smontare le modifiche nn te le fa
Mory è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 18:48   #12
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Nello script lo ho aggiunto; cmq sto pensando anche alla possibilità di controllare anche fstab, per monare i device se è presente una riga che li punti (ma dopo dovrò anche risolvere i symlink)
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 15-12-2004, 23:49   #13
Mory
Senior Member
 
Iscritto dal: Oct 1999
Città: Tra Como e Varese
Messaggi: 2803
Quote:
Originariamente inviato da SilverXXX
Nello script lo ho aggiunto; cmq sto pensando anche alla possibilità di controllare anche fstab, per monare i device se è presente una riga che li punti (ma dopo dovrò anche risolvere i symlink)
cmq tutta sta roba la fa già gvm
Mory è offline   Rispondi citando il messaggio o parte di esso
Old 16-12-2004, 07:51   #14
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Non fosse che con le penne usb che non avevo settato in fstab non andava, si, direi di si, cmq io uso kde e vorrei mantenere il tutto un pò integrato. Sarebbe interessante vedere il codice di gvm e preparare un kvm, basata sempre su hal e dbus, ma sarebbe mooooolto più lungo.
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 16-12-2004, 07:58   #15
Antipop
Member
 
Iscritto dal: May 2002
Messaggi: 35
Scusate, mi inserisco visto che si parla di automount. Io riesco a montare una partizione Dati che o messo in mnt, ma non ho i permessi per scriverci da utente.
In fstab ho modificato da root la riga aggiungendo umask=022 ma non combia nulla....

Grazie per l'aiuto!
Antipop è offline   Rispondi citando il messaggio o parte di esso
Old 16-12-2004, 08:06   #16
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Che fs usi? se ne usi uno unix, basta impostare i permessi della cartella su cui vuoi scrivere da root. Se usi un fs win mi sembra che umask=000 sia meglio (da tutti i permessi, per stare sul sicuro)
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 16-12-2004, 08:13   #17
Antipop
Member
 
Iscritto dal: May 2002
Messaggi: 35
Fat32. Ci provo e ti dico....

Ma ci devo mettere anche defaults,umask=000?


Ultima modifica di Antipop : 16-12-2004 alle 08:18.
Antipop è offline   Rispondi citando il messaggio o parte di esso
Old 16-12-2004, 08:19   #18
Antipop
Member
 
Iscritto dal: May 2002
Messaggi: 35
Non funzia!
Io che ho fatto: ho nella cartella mnt una cartella dati su cui non ho il permesso giusto?
Per far ciò ho aggiunto una riga al file. L'aggiunta di umask=000 deve essere fatta su quella riga?
Antipop è offline   Rispondi citando il messaggio o parte di esso
Old 16-12-2004, 08:48   #19
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Premetto che di solito io uso l'opzione users, così lo posso montare tranquillamente da utente, ma mi pare defaults non ci debba andare in fstab
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
Old 16-12-2004, 08:59   #20
SilverXXX
Senior Member
 
L'Avatar di SilverXXX
 
Iscritto dal: Jan 2004
Città: Gatteo
Messaggi: 2955
Allora, ho trovato qualcosa per lo script, che semplifica molto il tutto, ma richiede udev come device manager (niente dev statici o devfs); in pratica udev dopo aver creato i device richiama uno script passando il device come variabile DEVNAME. Adesso dovrei implementare il tutto abbastanza in fretta.
__________________
And so at last the beast fell and the unbelievers rejoiced. But all was not lost, for from the ash rose a great bird. The bird gazed down upon the unbelievers and cast fire and thunder upon them. For the beast had been reborn with its strength renewed, and the followers of Mammon cowered in horror.
SilverXXX è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Sony INZONE H6 Air: il primo headset open-back di Sony per giocatori Sony INZONE H6 Air: il primo headset open-back d...
Nutanix cambia pelle: dall’iperconvergenza alla piattaforma full stack per cloud ibrido e IA Nutanix cambia pelle: dall’iperconvergenza alla ...
Recensione Xiaomi Pad 8 Pro: potenza bruta e HyperOS 3 per sfidare la fascia alta Recensione Xiaomi Pad 8 Pro: potenza bruta e Hyp...
NZXT H9 Flow RGB+, Kraken Elite 420 e F140X: abbiamo provato il tris d'assi di NZXT NZXT H9 Flow RGB+, Kraken Elite 420 e F140X: abb...
ASUS ROG Swift OLED PG34WCDN recensione: il primo QD-OLED RGB da 360 Hz ASUS ROG Swift OLED PG34WCDN recensione: il prim...
L'IA ha fatto incetta anche di processor...
Affidabilità delle GPU NVIDIA cro...
Maxi incendio in un parcheggio BYD: fiam...
Apple potrebbe diventare il terzo produt...
L'IA aiuta i computer quantistici con i ...
Nutanix Database Platform è ora i...
iliad lancia il 5G Standalone in Italia:...
Alexa+ da oggi disponibile anche in Ital...
SpaceX Starship: Ship 39 ha eseguito il ...
Auto usate: Peugeot 3008 tra le peggiori...
YMTC, il produttore di memorie 100% cine...
I gamer rinunciano alla RAM ma non agli ...
Oltre 100 estensioni Chrome malevole rub...
Multi Frame Generation 5x e 6x anche su ...
Kraken sotto ricatto dopo due accessi in...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 04:55.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v