netmount: rework init scripts

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-01-09 03:50:47 +01:00
parent 690658cdf3
commit 9317aa38df

View File

@ -1,5 +1,3 @@
#!/bin/sh
################################################################################ ################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv # Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv # http://www.openelec.tv
@ -24,11 +22,9 @@
# #
# runlevels: openelec, textmode # runlevels: openelec, textmode
. /etc/profile NETMOUNT_USERCONF="/storage/.config/netmount.conf"
NETMOUNT_USERCONF="/storage/.config/netmount.conf" if [ -f $NETMOUNT_USERCONF ]; then
if [ -f $NETMOUNT_USERCONF ]; then
IFS=" IFS="
" "
@ -39,9 +35,7 @@ IFS="
OPTIONS=`echo $i | awk -F\| '{print $4}' | sed 's/^[ \t]*//;s/[ \t]*$//'` OPTIONS=`echo $i | awk -F\| '{print $4}' | sed 's/^[ \t]*//;s/[ \t]*$//'`
progress "... mounting $SHARE to $MOUNTPOINT via $SERVICE ..." progress "... mounting $SHARE to $MOUNTPOINT via $SERVICE ..."
mkdir -p $MOUNTPOINT mkdir -p $MOUNTPOINT
case "$SERVICE" in case "$SERVICE" in
cifs|smb|samba) cifs|smb|samba)
mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1 mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1
@ -51,4 +45,4 @@ IFS="
;; ;;
esac esac
done done
fi fi