From 4d93066542ad5ad428cae6769310a98f3a67dc14 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 22 May 2011 22:42:35 +0200 Subject: [PATCH] netmount: add support for AFP mounts Signed-off-by: Stephan Raue --- packages/network/netmount/config/netmount.conf.sample | 8 +++++--- packages/network/netmount/scripts/netmount | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/network/netmount/config/netmount.conf.sample b/packages/network/netmount/config/netmount.conf.sample index d475827566..97de6a75bb 100644 --- a/packages/network/netmount/config/netmount.conf.sample +++ b/packages/network/netmount/config/netmount.conf.sample @@ -20,7 +20,7 @@ # netmount.conf # # This configuration file allows you to setup network mounts via -# CIFS (Samba) or NFS while the system is booting +# CIFS (Samba), NFS or AFP 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/) @@ -28,14 +28,16 @@ # Usage: # service | share on server | local mountpoint <| mount options> # -# - "service" can be "nfs" for NFS mounts or "cifs" for CIFS (Samba) mounts +# - "service" can be "nfs" for NFS mounts, "cifs" for CIFS (Samba) or +# "afp" for AFP (Apple File Protocol) 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 +# - be aware of the different syntax for NFS and AFP mount # - Local mountpoints should only be on /storage # # Examples: +# afp | 192.168.1.44/videos | /storage/mount/videos | : # cifs | //192.168.1.44/videos | /storage/mount/videos | username=user,pass=secret # cifs | //192.168.1.44/tv shows | /storage/mount/tvshows | username=user,pass=secret # nfs | 192.168.1.44:/videos | /storage/mount/videos diff --git a/packages/network/netmount/scripts/netmount b/packages/network/netmount/scripts/netmount index 49487d93da..60be6806ad 100755 --- a/packages/network/netmount/scripts/netmount +++ b/packages/network/netmount/scripts/netmount @@ -38,6 +38,9 @@ IFS=" mkdir -p $MOUNTPOINT case "$SERVICE" in + afp) + mount_afp afp://$OPTIONS@$SHARE "$MOUNTPOINT" > /dev/null 2>&1 & + ;; cifs) mount.cifs "$SHARE" "$MOUNTPOINT" -o "$OPTIONS" > /dev/null 2>&1 & ;;