lctr-rpi/rpi-camera-aux: add lauv-storage-client to cfg_services1.
This commit is contained in:
parent
970365d5bf
commit
3cbf0f9d71
45
systems/lauv-aux-rpi/fs/etc/rc.d/lauv-storage-client
Normal file
45
systems/lauv-aux-rpi/fs/etc/rc.d/lauv-storage-client
Normal file
@ -0,0 +1,45 @@
|
||||
mount_path()
|
||||
{
|
||||
rpath="$cfg_lauv_storage_host:$1"
|
||||
lpath="$1"
|
||||
|
||||
mkdir -p "$lpath"
|
||||
|
||||
mount -t nfs -o wsize=32768 "$rpath" "$lpath"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "* Mounted '$rpath' in '$lpath'"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
/usr/bin/rpcbind
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: failed to start rpcbind."
|
||||
return 1
|
||||
fi
|
||||
|
||||
for path in $cfg_lauv_storage_paths; do
|
||||
n=0; while [ $n -lt "$cfg_lauv_storage_timeout" ]; do
|
||||
mount_path "$path"
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
|
||||
let n++
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
killall rpcbind
|
||||
|
||||
for path in $cfg_lauv_storage_paths; do
|
||||
umount "$path"
|
||||
done
|
||||
}
|
@ -2,6 +2,10 @@ cfg_hostname='lauv-xtreme-2-cam'
|
||||
cfg_eth_ext_ip='10.0.10.52'
|
||||
cfg_eth_ext_mk='255.255.0.0'
|
||||
cfg_eth_ext_gw='10.0.0.1'
|
||||
cfg_lauv_storage_dir=/opt/lsts/dune/log
|
||||
cfg_lauv_storage_host=10.0.10.53
|
||||
cfg_lauv_storage_paths=/opt/lsts/dune/log
|
||||
cfg_lauv_storage_timeout=60
|
||||
cfg_ptpd_interface='eth0'
|
||||
cfg_services1='usbmount'
|
||||
cfg_services1='lauv-storage-client'
|
||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools rpcbind rpi-boot-firmware linux/rpi exiv2 pointgrey opencv nfs-utils ptpd'
|
||||
|
Reference in New Issue
Block a user