summaryrefslogtreecommitdiffstats
path: root/abs/extra/autofs
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/autofs')
-rw-r--r--abs/extra/autofs/Changelog2
-rw-r--r--abs/extra/autofs/PKGBUILD54
-rw-r--r--abs/extra/autofs/auto.master6
-rw-r--r--abs/extra/autofs/auto.misc7
-rw-r--r--abs/extra/autofs/autofs43
-rw-r--r--abs/extra/autofs/autofs.conf.d4
-rw-r--r--abs/extra/autofs/autofs.install5
-rwxr-xr-xabs/extra/autofs/finish3
-rw-r--r--abs/extra/autofs/heimdal.patch34
-rwxr-xr-xabs/extra/autofs/run5
10 files changed, 163 insertions, 0 deletions
diff --git a/abs/extra/autofs/Changelog b/abs/extra/autofs/Changelog
new file mode 100644
index 0000000..f25555e
--- /dev/null
+++ b/abs/extra/autofs/Changelog
@@ -0,0 +1,2 @@
+5.0.4-5 4/29/09
+Cecil - Added run and finish files for runit.
diff --git a/abs/extra/autofs/PKGBUILD b/abs/extra/autofs/PKGBUILD
new file mode 100644
index 0000000..7524ae4
--- /dev/null
+++ b/abs/extra/autofs/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 36638 2009-04-26 19:00:46Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Dale Blount <dale@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=autofs
+pkgver=5.0.4
+pkgrel=5
+pkgdesc="A kernel-based automounter for Linux."
+arch=('i686' 'x86_64')
+url="http://wiki.autofs.net/FrontPage"
+license=('GPL2')
+depends=('libldap' 'libxml2' 'heimdal')
+backup=(etc/autofs/auto.master etc/autofs/auto.misc etc/conf.d/autofs)
+install=autofs.install
+source=("http://www.kernel.org/pub/linux/daemons/${pkgname}/v5/${pkgname}-${pkgver}.tar.bz2"
+ 'autofs' 'autofs.conf.d' 'auto.master' 'auto.misc'
+ 'heimdal.patch' 'run' 'finish')
+md5sums=('2646dde61edd08dd952255558c733c08'
+ 'b4984b3161f50cba3d189b0ec594d014'
+ '47f597c870410055e0fdb66103daf928'
+ 'a6cefb591e77b31b79dbb7243646c96b'
+ 'd8a15ec9186c5c0b36e5cea1e2739e8a'
+ '1ee4825e26ad72bfe86acec3d3da5d2a'
+ '74d3b5b6c4421275448084472cfa691a'
+ '43410e98ecb224cde73ce32be5a6aa14')
+
+build() {
+ export MAKEFLAGS="-j1"
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ sed -i "s:SUBDIRS = lib daemon modules man samples:SUBDIRS = lib daemon modules man:" Makefile.rules
+ patch -Np1 -i ${srcdir}/heimdal.patch
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/autofs \
+ --with-mapdir=/etc/autofs \
+ --without-hesiod
+ make || return 1
+ make INSTALLROOT=${pkgdir} install
+
+ local conf_file
+ for conf_file in auto.{master,misc}; do
+ install -D -m 644 ${srcdir}/$conf_file ${pkgdir}/etc/autofs/$conf_file
+ done
+
+ sed -i "s:/etc:/etc/autofs:g" ${pkgdir}/usr/share/man/man5/auto.master.5
+ install -D -m 755 ${srcdir}/autofs ${pkgdir}/etc/rc.d/autofs
+ install -D -m 644 ${srcdir}/autofs.conf.d ${pkgdir}/etc/conf.d/autofs
+ mkdir -p ${pkgdir}/etc/sv/autofs/supervise
+ install -D -m 744 ${srcdir}/run ${pkgdir}/etc/sv/autofs
+ install -D -m 744 ${srcdir}/finish ${pkgdir}/etc/sv/autofs
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/abs/extra/autofs/auto.master b/abs/extra/autofs/auto.master
new file mode 100644
index 0000000..be4ea73
--- /dev/null
+++ b/abs/extra/autofs/auto.master
@@ -0,0 +1,6 @@
+# Sample auto.master file
+# Format of this file:
+# mountpoint map options
+# For details of the format look at autofs(5).
+
+#/media /etc/autofs/auto.media
diff --git a/abs/extra/autofs/auto.misc b/abs/extra/autofs/auto.misc
new file mode 100644
index 0000000..5691566
--- /dev/null
+++ b/abs/extra/autofs/auto.misc
@@ -0,0 +1,7 @@
+# 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
+
+cdrom -fstype=iso9660,ro,nodev,nosuid :/dev/cdrom
+floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl
+usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sda1
diff --git a/abs/extra/autofs/autofs b/abs/extra/autofs/autofs
new file mode 100644
index 0000000..59ea4f5
--- /dev/null
+++ b/abs/extra/autofs/autofs
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/autofs ] && . /etc/conf.d/autofs
+
+if [ ! -z "$TIMEOUT" ]; then
+ daemonoptions="--timeout=$TIMEOUT $daemonoptions"
+fi
+
+PID=`cat /var/run/autofs-running 2> /dev/null`
+case "$1" in
+ start)
+ stat_busy "Starting Automounter"
+ [ -z "$PID" ] && /usr/sbin/automount $daemonoptions &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon autofs
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Automounter"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon autofs
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/extra/autofs/autofs.conf.d b/abs/extra/autofs/autofs.conf.d
new file mode 100644
index 0000000..bc82491
--- /dev/null
+++ b/abs/extra/autofs/autofs.conf.d
@@ -0,0 +1,4 @@
+#localoptions='rsize=8192,wsize=8192'
+
+# e.g. --timeout=60
+daemonoptions=''
diff --git a/abs/extra/autofs/autofs.install b/abs/extra/autofs/autofs.install
new file mode 100644
index 0000000..61120bb
--- /dev/null
+++ b/abs/extra/autofs/autofs.install
@@ -0,0 +1,5 @@
+post_install(){
+ echo "########################################################"
+ echo "In autofs5 --ghost option isn't valid. In order to start"
+ echo "autofs you must remove it from your /etc/conf.d/autofs. "
+}
diff --git a/abs/extra/autofs/finish b/abs/extra/autofs/finish
new file mode 100755
index 0000000..26f9d19
--- /dev/null
+++ b/abs/extra/autofs/finish
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+sv down autofs
diff --git a/abs/extra/autofs/heimdal.patch b/abs/extra/autofs/heimdal.patch
new file mode 100644
index 0000000..c49b1fd
--- /dev/null
+++ b/abs/extra/autofs/heimdal.patch
@@ -0,0 +1,34 @@
+--- autofs-5.0.4/modules/cyrus-sasl.c~ 2009-01-11 17:18:55.000000000 +0100
++++ autofs-5.0.4/modules/cyrus-sasl.c 2009-01-11 17:18:55.000000000 +0100
+@@ -66,6 +66,15 @@
+ #endif
+ #endif
+
++/**
++ * The type of a principal is different for MIT Krb5 and Heimdal.
++ * These macros are provided by Heimdal, and introduced here for MIT.
++ */
++#ifndef krb5_realm_length
++#define krb5_realm_length(r) ((r).length)
++#define krb5_realm_data(r) ((r).data)
++#endif
++
+ /*
+ * Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME
+ * environment variable so that the library knows where to find it.
+@@ -451,11 +460,11 @@
+
+ /* setup a principal for the ticket granting service */
+ ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ strlen(KRB5_TGS_NAME), KRB5_TGS_NAME,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ 0);
+ if (ret) {
+ error(logopt,
diff --git a/abs/extra/autofs/run b/abs/extra/autofs/run
new file mode 100755
index 0000000..b35a4ea
--- /dev/null
+++ b/abs/extra/autofs/run
@@ -0,0 +1,5 @@
+#!/bin/sh
+exec 2>&1
+set -e # barf if modprobe fails
+/sbin/modprobe autofs4
+exec /etc/rc.d/autofs start