lauv-aux-rpi/fs/etc/rc.d: add service usbmount to mount usb in /opt/lsts/dune/log.

This commit is contained in:
Pedro Gonçalves 2018-04-20 20:08:20 +01:00
parent f62cbc4678
commit e0090cdf1b

View File

@ -0,0 +1,28 @@
try_mount_storage()
{
n=0; while [ $n -lt 30 ]; do
/bin/mount "$1" /opt/lsts/dune/log
if [ $? -eq 0 ]; then
return 0
fi
sleep 1
let n++
done
return 1
}
start()
{
try_mount_storage /dev/sda1
echo "* USB Mounted in /opt/lsts/dune/log"
}
stop()
{
/bin/umount /dev/sda1
echo "* USB Umounted"
}