mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
netmount: add nfs mount support
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
50019f8e26
commit
f443527cb4
@ -1,18 +1,22 @@
|
||||
# netmount.conf
|
||||
#
|
||||
# This configuration file allows you to setup network mounts via
|
||||
# CIFS (Samba) while the system is booting
|
||||
# CIFS (Samba) or NFS while the system is booting
|
||||
#
|
||||
# This is an sample file, please rename or copy this file to
|
||||
# netmount.conf in the samba share "Configfiles" (or /storage/.config/)
|
||||
#
|
||||
# Usage:
|
||||
# service | share on server | local mountpoint | mount options
|
||||
# service | share on server | local mountpoint <| mount options>
|
||||
#
|
||||
# - "service" can be "nfs" for NFS mounts or "cifs" for CIFS (Samba) mounts
|
||||
# - Please use an "|" as delimiter
|
||||
# - Don't use spaces in usernames, passwords and options
|
||||
# - for NFS mounts there is no support for options
|
||||
# - be aware of the different syntax for NFS shares
|
||||
# - Local mountpoints should only be on /storage
|
||||
#
|
||||
# Examples:
|
||||
# cifs | //192.168.1.44/videos | /storage/mount/videos | username=user,password=secret
|
||||
# cifs | //192.168.1.44/tv shows | /storage/mount/tvshows | username=user,password=secret
|
||||
# nfs | 192.168.1.44:/videos | /storage/mount/videos
|
||||
|
@ -30,10 +30,6 @@
|
||||
|
||||
if [ -f $NETMOUNT_USERCONF ]; then
|
||||
|
||||
progress "Mounting Network shares"
|
||||
|
||||
if [ -f /usr/bin/mount.cifs ]; then
|
||||
|
||||
IFS="
|
||||
"
|
||||
for i in `cat $NETMOUNT_USERCONF |grep -v "^#"`; do
|
||||
@ -42,19 +38,17 @@ IFS="
|
||||
MOUNTPOINT=`echo $i | awk -F\| '{print $3}' | sed 's/^[ \t]*//;s/[ \t]*$//'`
|
||||
OPTIONS=`echo $i | awk -F\| '{print $4}' | sed 's/^[ \t]*//;s/[ \t]*$//'`
|
||||
|
||||
|
||||
progress "... mounting $SHARE to $MOUNTPOINT ..."
|
||||
progress "... mounting $SHARE to $MOUNTPOINT via $SERVICE ..."
|
||||
|
||||
mkdir -p $MOUNTPOINT
|
||||
|
||||
case "$SERVICE" in
|
||||
cifs|smb|samba)
|
||||
mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1
|
||||
mount.cifs "$SHARE" "$MOUNTPOINT" "$OPTIONS" > /dev/null 2>&1
|
||||
;;
|
||||
nfs)
|
||||
mount.nfs "$SHARE" "$MOUNTPOINT" > /dev/null 2>&1
|
||||
;;
|
||||
# nfs)
|
||||
# mount.nfs $SHARE $MOUNTPOINT -o $OPTIONS
|
||||
# ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
@ -5,7 +5,7 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.openelec.tv"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS="samba connman"
|
||||
PKG_DEPENDS="samba nfs-utils connman"
|
||||
PKG_BUILD_DEPENDS="toolchain"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="tools"
|
||||
|
Loading…
x
Reference in New Issue
Block a user