--- Quote Start ---
originally posted by nacide@Jun 8 2006, 03:03 AM
i wrote a little shell script to mount the usb stick, but i dont know if this is the best solution. i wanted to port autofs first but it was to heavyweight.
for the shell script i use /proc/partitions and /proc/mounts to automount.
# !/bin/sh
while true
do
grep sda /proc/partitions > /dev/zero
if test $? -eq 0; then
grep sda /proc/mounts > /dev/zero
if test $? -eq 1; then
echo "*** mount usbdisk ***"
mount -n -t vfat /dev/sda /mnt/usb
fi
else
grep sda /proc/mounts > /dev/zero
if test $? -eq 0; then
echo "*** unmount usbdisk ***"
umount -n /mnt/usb
fi
fi
sleep 1
done
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16023)
--- quote end ---
--- Quote End ---
hi,
Thank your reply.
I did follow your reply,but it can't work.
It show "Bad command or file name" for every command which your reply.
Can anyone tell me where i take a mistake?