PDA

View Full Version : How to map Movies folder to a folder on USB drive


LilleMama
26-04-2009, 18:14
How to map Movies folder to a folder on USB drive

edit S.sh in /MMP/usr/bin
(remount the MMP dir first using: mount -o remount,rw -t ext3 /dev/hda1 /MMP)

Then append the next lines (assuming your dirs are called movie, picture and music)

sleep 10

if [ -d "/DATA/usb1/sda1/movie/" ]; then
mount -o bind /DATA/usb1/sda1/movie/ /DATA/movie
elif [ -d "/DATA/usb2/sdb1/movie/" ]; then
mount -o bind /DATA/usb2/sdb1/movie/ /DATA/movie
fi

if [ -d "/DATA/usb1/sda1/music/" ]; then
mount -o bind /DATA/usb1/sda1/music/ /DATA/music
elif [ -d "/DATA/usb2/sdb1/music/" ]; then
mount -o bind /DATA/usb2/sdb1/music/ /DATA/music
fi

if [ -d "/DATA/usb1/sda1/picture/" ]; then
mount -o bind /DATA/usb1/sda1/picture/ /DATA/picture
elif [ -d "/DATA/usb2/sdb1/picture/" ]; then
mount -o bind /DATA/usb2/sdb1/picture/ /DATA/picture
fi

Thanks to Waspy