Permalink
Browse files

autofs added, thx to olistudent for the patches

git-svn-id: file:///var/svn/freetz/trunk@6198 149334a1-2f27-0410-a3b9-fc62619ac1e6
  • Loading branch information...
1 parent bf993a9 commit d45551655928f872db352dbbb5f8465787d2515d cuma committed Nov 18, 2010
View
@@ -69,6 +69,7 @@ Latest changes:
* aiccu 20070115
* apr 1.4.2
* apr-util 1.3.10
+ * autofs 5.0.5
* berkeley-db 4.8.30
* bittwist 1.1
* comgt 0.32
View
@@ -28,6 +28,7 @@ dropbear STARTLEVEL=30
dnsmasq STARTLEVEL=40 # multid-wrapper may start it earlier!
#Mounting
+autofs STARTLEVEL=50
cifsmount STARTLEVEL=50
davfs2 STARTLEVEL=50
View
@@ -76,6 +76,7 @@ endmenu
menu "Testing"
source make/apache/Config.in
+source make/autofs/Config.in
source make/bash/Config.in
source make/bfusb/Config.in
source make/bip/Config.in
View
@@ -0,0 +1,54 @@
+config FREETZ_PACKAGE_AUTOFS
+ bool "autofs 5.0.5"
+ depends on FREETZ_REPLACE_KERNEL
+ select FREETZ_MODULE_autofs4
+ select FREETZ_BUSYBOX_MOUNT_HELPERS
+ select FREETZ_BUSYBOX_MOUNT_LABEL
+ default n
+ help
+ autofs is a kernel-based automounter for Linux. It performs a job
+ similar to amd(8) but relies on a small stub of kernel code instead of
+ pretending to be an NFS server. The result is simpler code, better
+ reliability, and much faster operation in the common case (everything
+ already mounted.)
+
+config FREETZ_PACKAGE_AUTOFS_NFS
+ bool "select nfs module"
+ depends on FREETZ_PACKAGE_AUTOFS
+ select FREETZ_MODULE_nfs
+ default n
+ help
+ select this if you want mount NFS-Shares
+
+config FREETZ_PACKAGE_AUTOFS_CIFS
+ bool "select cifs package"
+ depends on FREETZ_PACKAGE_AUTOFS
+ select FREETZ_PACKAGE_CIFSMOUNT
+ default n
+ help
+ select this if you want mount Samba-Shares
+
+config FREETZ_PACKAGE_AUTOFS_DAVFS2
+ bool "select davfs2 package"
+ depends on FREETZ_PACKAGE_AUTOFS
+ select FREETZ_PACKAGE_DAVFS2
+ default n
+ help
+ select this if you want mount Webdav-Shares
+
+config FREETZ_PACKAGE_AUTOFS_SSHFS
+ bool "select sshfs package"
+ depends on FREETZ_PACKAGE_AUTOFS
+ select FREETZ_PACKAGE_SSHFS_FUSE
+ default n
+ help
+ select this if you want mount SSHfs-Shares
+
+config FREETZ_PACKAGE_AUTOFS_CURL
+ bool "select curl package"
+ depends on FREETZ_PACKAGE_AUTOFS
+ select FREETZ_PACKAGE_CURL
+ default n
+ help
+ select this if you want mount FTP-Shares
+
View
@@ -0,0 +1,3 @@
+ifeq ($(strip $(FREETZ_PACKAGE_AUTOFS)),y)
+PACKAGES+=autofs
+endif
View
@@ -0,0 +1,57 @@
+$(call PKG_INIT_BIN, 5.0.5)
+$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tar.gz
+$(PKG)_SOURCE_MD5:=0fe158444818f64da731520e31dc09bd
+$(PKG)_SITE:=ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/
+$(PKG)_BINARY:=$($(PKG)_DIR)/daemon/automount
+$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/bin/automount
+
+$(PKG)_LIBRARIES_ALL := lookup_file.so \
+ lookup_hosts.so \
+ lookup_multi.so \
+ lookup_program.so \
+ lookup_userhome.so \
+ mount_afs.so \
+ mount_autofs.so \
+ mount_bind.so \
+ mount_changer.so \
+ mount_generic.so \
+ mount_nfs.so \
+ parse_sun.so
+
+$(PKG)_LIBRARIES := $($(PKG)_LIBRARIES_ALL)
+$(PKG)_LIBS_BUILD_DIR := $($(PKG)_LIBRARIES:%=$($(PKG)_DIR)/modules/%)
+$(PKG)_LIBS_TARGET_DIR := $($(PKG)_LIBRARIES:%=$($(PKG)_DEST_LIBDIR)/%)
+
+
+$(PKG)_BUILD_PREREQ += bison flex
+$(PKG)_STARTLEVEL=50
+
+$(PKG_SOURCE_DOWNLOAD)
+$(PKG_UNPACKED)
+$(PKG_CONFIGURED_NOP)
+
+$($(PKG)_LIBS_BUILD_DIR) $($(PKG)_BINARY): $($(PKG)_DIR)/.configured
+ $(SUBMAKE1) daemon -C $(AUTOFS_DIR) \
+ FREETZ=1 \
+ CC="$(TARGET_CC)" \
+ AUTOFS_CFLAGS="$(TARGET_CFLAGS)"
+
+$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY)
+ $(INSTALL_BINARY_STRIP)
+
+$($(PKG)_LIBS_TARGET_DIR): $($(PKG)_DEST_LIBDIR)/%: $($(PKG)_DIR)/modules/%
+ $(INSTALL_LIBRARY_STRIP)
+
+$(pkg):
+
+$(pkg)-precompiled: $($(PKG)_LIBS_TARGET_DIR) $($(PKG)_TARGET_BINARY)
+
+
+$(pkg)-clean:
+ -$(SUBMAKE) -C $(AUTOFS_DIR) clean
+ $(RM) $(AUTOFS_DIR)/.configured
+
+$(pkg)-uninstall:
+ $(RM) $(AUTOFS_TARGET_BINARY)
+
+$(PKG_FINISH)
@@ -0,0 +1 @@
+[ "$EXTERNAL_FREETZ_PACKAGE_AUTOFS" == "y" ] && EXTERNAL_FILES+=" /usr/bin/automount /usr/lib/freetz/lookup_file.so /usr/lib/freetz/lookup_hosts.so /usr/lib/freetz/lookup_multi.so /usr/lib/freetz/lookup_program.so /usr/lib/freetz/lookup_userhome.so /usr/lib/freetz/mount_afs.so /usr/lib/freetz/mount_autofs.so /usr/lib/freetz/mount_bind.so /usr/lib/freetz/mount_changer.so /usr/lib/freetz/mount_generic.so /usr/lib/freetz/mount_nfs.so /usr/lib/freetz/parse_sun.so"
View
@@ -0,0 +1,20 @@
+config EXTERNAL_FREETZ_PACKAGE_AUTOFS
+ depends on EXTERNAL_ENABLED && FREETZ_PACKAGE_AUTOFS
+ bool "autofs"
+ default n
+ help
+ externals these file(s):
+ /usr/bin/automount
+ /usr/lib/freetz/lookup_file.so
+ /usr/lib/freetz/lookup_hosts.so
+ /usr/lib/freetz/lookup_multi.so
+ /usr/lib/freetz/lookup_program.so
+ /usr/lib/freetz/lookup_userhome.so
+ /usr/lib/freetz/mount_afs.so
+ /usr/lib/freetz/mount_autofs.so
+ /usr/lib/freetz/mount_bind.so
+ /usr/lib/freetz/mount_changer.so
+ /usr/lib/freetz/mount_generic.so
+ /usr/lib/freetz/mount_nfs.so
+ /usr/lib/freetz/parse_sun.so
+
@@ -0,0 +1,2 @@
+[ "$EXTERNAL_FREETZ_PACKAGE_AUTOFS" == "y" ] && EXTERNAL_SERVICES+=" autofs"
+
@@ -0,0 +1,10 @@
+languages
+{ de en }
+default
+{ en }
+files
+{
+ usr/lib/cgi-bin/autofs.cgi
+ etc/default.autofs/auto_conf.def
+}
+
@@ -0,0 +1 @@
+/var/media/autofs /tmp/flash/autofs/auto.conf --timeout=60
@@ -0,0 +1,9 @@
+CAPTION='autofs: auto.conf'
+DESCRIPTION='$(lang de:"Syntax: Bezeichnung [-Optionen] Ursprung" en:"Syntax: key [-options] location")'
+
+CONFIG_FILE='/tmp/flash/autofs/auto.conf'
+CONFIG_SAVE='modsave flash; if pidof automount > /dev/null; then echo ""; /mod/etc/init.d/rc.autofs restart; fi'
+CONFIG_TYPE='text'
+
+TEXT_ROWS=15
+
@@ -0,0 +1,2 @@
+export AUTOFS_ENABLED='no'
+export AUTOFS_CMDLINE=''
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+DAEMON=autofs
+DAEMON_BIN=automount
+PID_FILE=/var/run/automount/autofs-running
+. /etc/init.d/modlibrc
+
+
+config() {
+ mkdir -p $(dirname $PID_FILE)
+ mkdir -p /var/media/autofs
+ mkdir -p /var/cache
+ modprobe fuse 2>/dev/null
+ modprobe cifs 2>/dev/null
+ modprobe nfs 2>/dev/null
+ modprobe autofs4
+}
+
+start() {
+ modlib_startdaemon $DAEMON_BIN $AUTOFS_CMDLINE
+}
+
+stop() {
+ local current_pid="$(cat $PID_FILE 2>/dev/null)"
+ kill $current_pid 2>/dev/null
+ sync
+ sleep 1
+ if kill -0 $current_pid 2>/dev/null; then
+ killall -9 $DAEMON_BIN
+ fi
+}
+
+case $1 in
+ ""|load)
+ [ ! -d "/tmp/flash/$DAEMON" ] && mkdir -p /tmp/flash/$DAEMON
+ [ ! -d /var/media/autofs ] && mkdir -p /var/media/autofs
+
+ modreg file $DAEMON conf 'auto.conf' 1 "auto_conf"
+ modreg cgi $DAEMON autofs
+ modreg daemon $DAEMON
+
+ modlib_start $AUTOFS_ENABLED
+ ;;
+ unload)
+ modunreg file $DAEMON
+ modunreg daemon $DAEMON
+ modunreg cgi $DAEMON
+
+ modlib_stop
+ ;;
+ start)
+ modlib_start
+ ;;
+ stop)
+ modlib_stop
+ ;;
+ restart)
+ modlib_restart
+ ;;
+ reload)
+ modlib_reload
+ ;;
+ status)
+ modlib_status
+ ;;
+ *)
+ echo "Usage: $0 [load|unload|start|stop|restart|reload|status]" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+. /usr/lib/libmodcgi.sh
+
+check "$AUTOFS_ENABLED" yes:auto "*":man
+
+sec_begin '$(lang de:"Starttyp" en:"Start type")'
+
+cat << EOF
+<p>
+<input id="e1" type="radio" name="enabled" value="yes"$auto_chk><label for="e1"> $(lang de:"Automatisch" en:"Automatic")</label>
+<input id="e2" type="radio" name="enabled" value="no"$man_chk><label for="e2"> $(lang de:"Manuell" en:"Manual")</label>
+EOF
+cat << EOF
+</p>
+EOF
+
+sec_end
+sec_begin '$(lang de:"Konfiguration" en:"Configuration")'
+
+cat << EOF
+<h2>$(lang de:"Optionale Aufrufparameter:" en:"Optional commandline parameters:")</h2>
+<p><input type="text" name="cmdline" size="55" maxlength="250" value="$(html "$AUTOFS_CMDLINE")"></p>
+
+EOF
+
+sec_end
@@ -0,0 +1,22 @@
+--- Makefile.rules.orig 2009-09-03 12:00:12.000000000 +0200
++++ Makefile.rules 2010-11-13 11:12:58.512993698 +0100
+@@ -22,6 +22,11 @@
+ DEBUG=1
+ endif
+
++ifdef FREETZ
++CFLAGS = $(AUTOFS_CFLAGS)
++LDFLAGS =
++STRIP = :
++else
+ ifdef DEBUG
+ CFLAGS ?= -g -Wall -DDEBUG
+ LDFLAGS = -g
+@@ -37,6 +42,7 @@
+ STRIP = strip --strip-debug
+ endif
+ endif
++endif
+
+ CC = gcc
+ CXX = g++
@@ -0,0 +1,11 @@
+--- include/rpc_subs.h.orig 2010-11-13 11:42:49.812995203 +0100
++++ include/rpc_subs.h 2010-11-13 11:42:06.882994841 +0100
+@@ -18,7 +18,7 @@
+
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+-#include <nfs/nfs.h>
++#include <linux/nfs.h>
+ #include <linux/nfs2.h>
+ #include <linux/nfs3.h>
+
@@ -0,0 +1,10 @@
+--- lib/rpc_subs.c.orig 2010-11-13 12:22:26.026725814 +0100
++++ lib/rpc_subs.c 2010-11-13 12:22:20.306727305 +0100
+@@ -27,7 +27,6 @@
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+-#include <rpcsvc/ypclnt.h>
+ #include <errno.h>
+ #include <sys/ioctl.h>
+ #include <ctype.h>
Oops, something went wrong.

0 comments on commit d455516

Please sign in to comment.