lauv-aux-rpi/fs/etc/rc.d: add service usbmount to mount usb in /opt/lsts/dune/log.
This commit is contained in:
parent
f62cbc4678
commit
e0090cdf1b
28
systems/lauv-aux-rpi/fs/etc/rc.d/usbmount
Normal file
28
systems/lauv-aux-rpi/fs/etc/rc.d/usbmount
Normal 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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user