summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gottinger <achim@gentoo.org>2000-08-08 17:53:33 +0000
committerAchim Gottinger <achim@gentoo.org>2000-08-08 17:53:33 +0000
commit3997bcb2a4b335414aaab55cf45b60787966f1d4 (patch)
tree7cfbc44a8545cf38e886df9747e890e472d5580f /net-fs/autofs
parent*** empty log message *** (diff)
downloadhistorical-3997bcb2a4b335414aaab55cf45b60787966f1d4.tar.gz
historical-3997bcb2a4b335414aaab55cf45b60787966f1d4.tar.bz2
historical-3997bcb2a4b335414aaab55cf45b60787966f1d4.zip
*** empty log message ***
Diffstat (limited to 'net-fs/autofs')
-rw-r--r--net-fs/autofs/autofs-3.1.5-r1.ebuild44
-rw-r--r--net-fs/autofs/files/auto.home7
-rw-r--r--net-fs/autofs/files/auto.master8
-rw-r--r--net-fs/autofs/files/auto.misc7
-rwxr-xr-xnet-fs/autofs/files/autofs160
-rw-r--r--net-fs/autofs/files/digest1
6 files changed, 227 insertions, 0 deletions
diff --git a/net-fs/autofs/autofs-3.1.5-r1.ebuild b/net-fs/autofs/autofs-3.1.5-r1.ebuild
new file mode 100644
index 000000000000..c8edcc055f1e
--- /dev/null
+++ b/net-fs/autofs/autofs-3.1.5-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/autofs-3.1.5-r1.ebuild,v 1.1 2000/08/08 17:53:33 achim Exp $
+
+P=autofs-3.1.5
+A=${P}.tar.bz2
+S=${WORKDIR}/${P}
+CATEGORY="net-fs"
+DESCRIPTION="Automounter"
+SRC_URI="ftp://ftp.kernel.org/pub/linux/daemons/autofs/${A}
+ ftp://ftp.de.kernel.org/pub/linux/daemons/autofs/${A}
+ ftp://ftp.uk.kernel.org/pub/linux/daemons/autofs/${A}"
+
+src_compile() {
+ cd ${S}
+ ./configure --host=${HOST} --prefix=/usr
+ make
+}
+
+src_install() {
+ cd ${S}
+ into /usr
+ dosbin daemon/automount
+ insinto /usr/lib/autofs
+ insopts -m 755
+ doins modules/*.so
+ dodoc COPYING COPYRIGHT NEWS README* TODO
+ cd man
+ doman auto.master.5 autofs.5 autofs.8 automount.8
+ cd ../samples
+ dodir /etc/autofs
+ cp ${O}/files/auto.master ${D}/etc/autofs
+ cp ${O}/files/auto.misc ${D}/etc/autofs
+ dodir /etc/rc.d/init.d
+ cp ${O}/files/autofs ${D}/etc/rc.d/init.d
+}
+
+pkg_config() {
+ . ${ROOT}/etc/rc.d/config/functions
+ einfo "Activating autofs..."
+ ${ROOT}/usr/sbin/rc-update add autofs
+}
+
diff --git a/net-fs/autofs/files/auto.home b/net-fs/autofs/files/auto.home
new file mode 100644
index 000000000000..40dc775076f3
--- /dev/null
+++ b/net-fs/autofs/files/auto.home
@@ -0,0 +1,7 @@
+# $Id: auto.home,v 1.1 2000/08/08 17:53:33 achim Exp $
+# This is an automounter map and it has the following format
+# key [ -mount-options-separated-by-comma ] location
+# Details may be found in the autofs(5) manpage
+#* -rw autofs_home
+
+
diff --git a/net-fs/autofs/files/auto.master b/net-fs/autofs/files/auto.master
new file mode 100644
index 000000000000..9f32a7cad4b8
--- /dev/null
+++ b/net-fs/autofs/files/auto.master
@@ -0,0 +1,8 @@
+# $Id: auto.master,v 1.1 2000/08/08 17:53:33 achim Exp $
+# Sample auto.master file
+# Format of this file:
+# mountpoint map options
+# For details of the format look at autofs(8).
+/misc /etc/autofs/auto.misc
+#/home /etc/autofs/auto.home
+
diff --git a/net-fs/autofs/files/auto.misc b/net-fs/autofs/files/auto.misc
new file mode 100644
index 000000000000..cc20091c5621
--- /dev/null
+++ b/net-fs/autofs/files/auto.misc
@@ -0,0 +1,7 @@
+# $Id: auto.misc,v 1.1 2000/08/08 17:53:33 achim Exp $
+# This is an automounter map and it has the following format
+# key [ -mount-options-separated-by-comma ] location
+# Details may be found in the autofs(5) manpage
+boot -fstype=ext2 :/dev/hda1
+cd -fstype=iso9660,ro :/dev/cdrom
+floppy -fstype=auto :/dev/fd0
diff --git a/net-fs/autofs/files/autofs b/net-fs/autofs/files/autofs
new file mode 100755
index 000000000000..30b99b805e81
--- /dev/null
+++ b/net-fs/autofs/files/autofs
@@ -0,0 +1,160 @@
+#!/bin/bash
+#RCUPDATE:3 4:75:
+# $Id: autofs,v 1.1 2000/08/08 17:53:33 achim Exp $
+#
+# rc file for automount using a Sun-style "master map".
+# We first look for a local /etc/auto.master, then a YP
+# map with that name
+#
+# On most distributions, this file should be called:
+# /etc/rc.d/init.d/autofs or /etc/init.d/autofs
+#
+
+. /etc/rc.d/config/functions
+
+FLAGS="defaults 21"
+
+#
+# Location of the automount daemon and the init directory
+#
+
+SERVICE=autofs
+EXE=/usr/sbin/automount
+opts="start stop restart status reload"
+
+#
+# We can add local options here
+# e.g. localoptions='rsize=8192,wsize=8192'
+#
+localoptions=''
+
+#
+# This function will build a list of automount commands to execute in
+# order to activate all the mount points. It is used to figure out
+# the difference of automount points in case of a reload
+#
+function getmounts()
+{
+#
+# Check for local maps to be loaded
+#
+if [ -f /etc/autofs/auto.master ]
+then
+ cat /etc/autofs/auto.master | sed -e '/^#/d' -e '/^$/d'| (
+ while read dir map options
+ do
+ if [ ! -z "$dir" -a ! -z "$map" \
+ -a x`echo "$map" | cut -c1` != 'x-' ]
+ then
+ map=`echo "/etc/$map" | sed -e 's:^/etc//:/:'`
+ options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'`
+ if [ -x $map ]; then
+ echo "$EXE $dir program $map $options $localoptions"
+ elif [ -f $map ]; then
+ echo "$EXE $dir file $map $options $localoptions"
+ else
+ echo "$EXE $dir `basename $map` $options $localoptions"
+ fi
+ fi
+ done
+ )
+fi
+
+#
+# Check for YellowPage maps to be loaded
+#
+if [ -e /usr/bin/ypcat ] && [ `ypcat -k auto.master 2>/dev/null | wc -l` -gt 0 ]
+then
+ ypcat -k auto.master | (
+ while read dir map options
+ do
+ if [ ! -z "$dir" -a ! -z "$map" \
+ -a x`echo "$map" | cut -c1` != 'x-' ]
+ then
+ map=`echo "$map" | sed -e 's/^auto_/auto./'`
+ if echo $options | grep -- '-t' >/dev/null 2>&1 ; then
+ mountoptions="--timeout $(echo $options | \
+ sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')"
+ fi
+ options=`echo "$options" | sed -e '
+ s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g
+ s/\(^\|[ \t]\)-/\1/g'`
+ echo "$EXE $dir yp $map $options $localoptions"
+ fi
+ done
+ )
+fi
+}
+
+#
+# Status lister.
+#
+function status()
+{
+ echo "Configured Mount Points:"
+ echo "------------------------"
+ getmounts
+ echo ""
+ echo "Active Mount Points:"
+ echo "--------------------"
+ ps ax|grep "[0-9]:[0-9][0-9] automount " | (
+ while read pid tt stat time command; do echo $command; done
+ )
+}
+
+start() {
+ ebegin "Starting automounter..."
+ getmounts | while read cmd mnt rest
+ do
+ echo -n " $mnt"
+ pidfile=/var/run/autofs`echo $mnt | sed 's/\//./'`.pid
+ start-stop-daemon --start --pidfile $pidfile --quiet \
+ --exec $EXE -- $mnt $rest
+ #
+ # Automount needs a '--pidfile' or '-p' option.
+ # For now we look for the pid ourself.
+ #
+ ps ax | grep "[0-9]:[0-9][0-9] $EXE $mnt" | (
+ read pid rest
+ echo $pid > $pidfile
+ echo "$mnt $rest" >> $pidfile
+ )
+ done
+ eend $? "Error starting automounter"
+}
+
+stop() {
+ ebegin 'Stopping automounter.'
+ start-stop-daemon --stop --quiet --signal 12 --exec $EXE
+ eend $? "Error stopping automounter"
+
+}
+
+reload() {
+ echo "Reloading automounter: checking for changes ... "
+ TMP=/var/run/autofs.tmp
+ getmounts >$TMP
+ for i in /var/run/autofs.*.pid
+ do
+ pid=`head -n 1 $i 2>/dev/null`
+ [ "$pid" = "" ] && continue
+ command=`tail +2 $i`
+ if ! grep -q "^$command" $TMP
+ then
+ echo "Stopping automounter: $command"
+ kill -USR2 $pid
+ fi
+ done
+ rm -f $TMP
+ start
+}
+restart() {
+ stop
+ start
+}
+
+doservice ${@}
+
+
+
+
diff --git a/net-fs/autofs/files/digest b/net-fs/autofs/files/digest
new file mode 100644
index 000000000000..4a61c51c5d4f
--- /dev/null
+++ b/net-fs/autofs/files/digest
@@ -0,0 +1 @@
+MD5 ece68e3632584ae308bb4204574596c1 autofs-3.1.5.tar.bz2