Automount dispositivi USB

Akira Norimaki sutter.cane a rx78.org
Lun 15 Gen 2007 11:50:20 CET


Cristiano Deana wrote:
>> Per un amico sto pensando a come realizzare una box molto stupida, con samba, 
>> qualche condivisione e... dei dispositivi usb (mass storage).
> Forse questo ti puo' essere di aiuto:
> http://caia.swin.edu.au/reports/041130A/

http://www.xs4all.nl/~rsmith/freebsd/

<paste>
Devfs configuration for hotpluggable devices

To set permissions etc. for the USB devices that might not be plugged in
at boot, we use /etc/devfs.rules. The rules set in this files are
processed by the /etc/rc.d/devfs script which uses devfs(8) to put the
rules in the devfs system.

I've got a couple of USB mass storage devices that can be accessed via
the da(4) driver, and a USB scanner that works with the uscanner(4) driver.

To get these devices to work properly for non-root users (specifically
the members of usb group), the following rules are set in /etc/devfs.rules:

# /etc/devfs.rules
# Time-stamp: <2006-08-14 22:45:55 rsmith>

[slackbox_usb=10]
add path 'da*' mode 0660 group usb
add path 'uscanner*' mode 0660 group usb
add path 'tap*' mode 0660 group wheel
add path 'pass*' mode 0660 group cdrom

The first line assigns a name and number to a set of rules. The devfs(8)
command only knows about the number, the name is for convenience in the
startup script.

The second line assigns read/write permissions for the group usb to all
partitions of USB mass-storage devices.

The third line does the same for scanners.

To activate these settings after the next reboot, a line has to be added
to /etc/rc.conf:

# Set the default devfs ruleset.
devfs_system_ruleset="slackbox_usb"
</paste>

-- 
WoW: Realm *Silvermoon* . Chara:
*Saeba, Tauren Hunter* (Beast Mastery) lvl 47
*Kadargo, Tauren Warrior* (Protection) lvl 32
http://www.rx78.org/ctr/pic/wow/ [PNG]


-- 
WoW: Realm *Silvermoon* . Chara:
*Saeba, Tauren Hunter* (Beast Mastery) lvl 47
*Kadargo, Tauren Warrior* (Protection) lvl 32
http://www.rx78.org/ctr/pic/wow/ [PNG]


Maggiori informazioni sulla lista aiuto