ntfs automount

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


Hi guys,
pls dont laugh, i have started to learn scripting only after i
installed slitaz , ntfs automounting was a problem i wasnt able to
figure out,
so writing this script solved it , it runs at bootup and correctly
mounts my ntfs harddrives . i wanted to put it up on the forum but
then figured that
somebody could end up screwing up is machine because of this, so could
any of you confirm if this is ok

#!/bin/sh
#script to automount your NTFS hard drives
NTFSDEVICE=$(fdisk -l | grep NTFS| cut -d ' ' -f1 )
ARRAY=($NTFSDEVICE)
length=${#ARRAY[@]}
i=0
while [ $i -le $length ]
do
	echo ${ARRAY[$i]}
	echo  "i will make this directory /mnt${ARRAY[$i]}"
	mkdir -p /mnt${ARRAY[$i]}
	ntfsmount ${ARRAY[$i]} /mnt${ARRAY[$i]}
	i=$((i+1))
done

-- 
Thanx and regd's.

Allan.
http://www.in2dwok.com

---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/