mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
netmount: use mount.cifs, wait if network is up, cleanups
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
aaf86e5458
commit
acba5af789
@ -29,6 +29,9 @@
|
|||||||
NETMOUNT_USERCONF="/storage/.config/netmount.conf"
|
NETMOUNT_USERCONF="/storage/.config/netmount.conf"
|
||||||
|
|
||||||
if [ -f $NETMOUNT_USERCONF ]; then
|
if [ -f $NETMOUNT_USERCONF ]; then
|
||||||
|
|
||||||
|
wait_for_network
|
||||||
|
|
||||||
progress "Mounting Network shares"
|
progress "Mounting Network shares"
|
||||||
|
|
||||||
if [ -f /usr/bin/mount.cifs ]; then
|
if [ -f /usr/bin/mount.cifs ]; then
|
||||||
@ -47,18 +50,12 @@ IFS="
|
|||||||
|
|
||||||
case "$SERVICE" in
|
case "$SERVICE" in
|
||||||
cifs|smb|samba)
|
cifs|smb|samba)
|
||||||
for i in 1 2 3 4 5 6 7 8 9 10; do
|
mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1
|
||||||
ERR_ENV=1
|
|
||||||
mount -n -t cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1
|
|
||||||
[ $? -eq 0 ] && ERR_ENV=0 && break
|
|
||||||
usleep 750000
|
|
||||||
done
|
|
||||||
;;
|
;;
|
||||||
# nfs)
|
# nfs)
|
||||||
# mount.nfs $SHARE $MOUNTPOINT -o $OPTIONS
|
# mount.nfs $SHARE $MOUNTPOINT -o $OPTIONS
|
||||||
# ;;
|
# ;;
|
||||||
esac
|
esac
|
||||||
[ "$ERR_ENV" -ne 0 ] && echo "... could not mount $SHARE to $MOUNTPOINT"
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user