netmount: use mount.cifs, wait if network is up, cleanups

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-08-24 00:20:49 +02:00
parent aaf86e5458
commit acba5af789

View File

@ -29,6 +29,9 @@
NETMOUNT_USERCONF="/storage/.config/netmount.conf"
if [ -f $NETMOUNT_USERCONF ]; then
wait_for_network
progress "Mounting Network shares"
if [ -f /usr/bin/mount.cifs ]; then
@ -47,18 +50,12 @@ IFS="
case "$SERVICE" in
cifs|smb|samba)
for i in 1 2 3 4 5 6 7 8 9 10; do
ERR_ENV=1
mount -n -t cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1
[ $? -eq 0 ] && ERR_ENV=0 && break
usleep 750000
done
mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1
;;
# nfs)
# mount.nfs $SHARE $MOUNTPOINT -o $OPTIONS
# ;;
esac
[ "$ERR_ENV" -ne 0 ] && echo "... could not mount $SHARE to $MOUNTPOINT"
done
fi
fi