OpenWrt Forum Archive

Topic: Changing the USB Startup directory in hotplug.d

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi

today i got my new Asus 500 Deluxe router and im very impressed by work already done by the developer!
I`m very new to linux, so dont kill me for asking a simple question about a "simple" script ;-)

I would like to boot my USB Storage Device under \opt insted of \mnt\disc_01.
Can somebody help me to change the script below ?

mount_storage() {
        cd /dev/discs
        for dev in disc*; do
                [ -f /tmp/.${dev}_id ] || {
                        echo ${INTERFACE}${PRODUCT} > /tmp/.${dev}_id
                        mount | grep /mnt/${dev} || (
                                [ -d /mnt/. ] || {
                                        mkdir -p /tmp/mnt
                                        ln -s /tmp/mnt /
                                }
                                cd $dev
                                for part in part*; do
                                        path=/mnt/${dev}_${part##*part}
                                        mkdir -p ${path}
                                        mount ${part} ${path}
                                done
                        )
                }
        done
}

umount_storage() {
        for tmp in /tmp/.*_id; do


Thanks a lot in advance!

Richard

(Last edited by TarsInIon on 8 Apr 2006, 18:29)

i now used the script from http://www.macsat.com/macsat/content/view/15/30/

Thanks again for the tutorials, there are really useful!
The script was not working and i was wondering why.
After hours i now found that i have to change the permission.

"chmod a+x /etc/init.d/S11mount"

Could you please mention that in your HowTo`s ?

Thanks, Richard

The discussion might have continued from here.