netmount: add loop until network is up, use 'mount' instead 'mount.cifs' to avoid problems with readonly '/etc/mtab' (mtab locking)

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-07-30 20:04:45 +02:00
parent 45843816fa
commit 70677c91fa

View File

@ -46,19 +46,19 @@ IFS="
mkdir -p $MOUNTPOINT mkdir -p $MOUNTPOINT
case "$SERVICE" in case "$SERVICE" in
cifs) cifs|smb|samba)
mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" for i in 1 2 3 4 5 6 7 8 9 10; do
;; ERR_ENV=1
samba) mount -n -t cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1
mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" [ $? -eq 0 ] && ERR_ENV=0 && break
;; usleep 750000
smb) done
mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS"
;; ;;
# 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