Auto mount USB memory

This can be done by adding a section to your devd.conf. First one must determine a value for the match line to identify the USB memory stick. This can be done using the following commands:

#/etc/rc.d/devd stop
#devd -dD

Now insert or remove the memory stick. devd will display various output. Find the setting lines, and use one of those values in your devd.conf, in the example below, product is used. Remember to restart devd after the above (/etc/rc.d/devd start)

Add the following to your /etc/devd.conf

attach 20 {
        device-name "umass0";
        match "product" "0x1000";
        action "sleep 1 ; \
                sh /etc/rc.d/devfs restart ; \
                /sbin/mount /dev/da0s1 /usb"; 
};


back to main page

AutoMount (last edited 2009-04-07 03:07:14 by MarkDuller)

Site Meter