summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/autofs
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-09-08 07:33:44 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-09-08 07:33:44 (GMT)
commit525753e4a1a139e088d8ac120b19fbab6c0aaaa6 (patch)
tree35cef28abb613da4f58e83f6abbe4bd4cfa244bf /abs/extra-testing/autofs
parent592e3cad43ef12c53f523145d0fd981b54f2a049 (diff)
parentb172f79fadb565ecfbcec9508f9377d8618a4f4c (diff)
downloadlinhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.zip
linhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.tar.gz
linhes_pkgbuild-525753e4a1a139e088d8ac120b19fbab6c0aaaa6.tar.bz2
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/extra-testing/autofs')
-rwxr-xr-xabs/extra-testing/autofs/PKGBUILD27
-rw-r--r--abs/extra-testing/autofs/autofs50
2 files changed, 60 insertions, 17 deletions
diff --git a/abs/extra-testing/autofs/PKGBUILD b/abs/extra-testing/autofs/PKGBUILD
index ac317d2..ae04100 100755
--- a/abs/extra-testing/autofs/PKGBUILD
+++ b/abs/extra-testing/autofs/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=autofs
pkgver=5.0.5
-pkgrel=1
+pkgrel=3
pkgdesc="A kernel-based automounter for Linux"
arch=('i686' 'x86_64')
url="http://wiki.autofs.net/FrontPage"
@@ -14,8 +14,14 @@ depends=('libldap' 'libxml2' 'heimdal')
backup=(etc/autofs/auto.master etc/autofs/auto.misc etc/conf.d/autofs)
install=${pkgname}.install
source=("http://www.kernel.org/pub/linux/daemons/${pkgname}/v5/${pkgname}-${pkgver}.tar.bz2"
- 'autofs.conf.d' 'auto.master' 'auto.misc'
- 'heimdal.patch' 'run' 'log.run' 'finish')
+ 'autofs' 'autofs.conf.d' 'auto.master' 'auto.misc'
+ 'heimdal.patch')
+md5sums=('a1d262cb6ebef0c2dd0fe22232fb3d5a'
+ 'e307bf6d2638e46eeb916cf42fe029b2'
+ '47f597c870410055e0fdb66103daf928'
+ 'a6cefb591e77b31b79dbb7243646c96b'
+ 'd8a15ec9186c5c0b36e5cea1e2739e8a'
+ 'efd46b6406b940cb48f7c6197790fb8e')
build() {
export MAKEFLAGS="-j1"
@@ -39,19 +45,6 @@ package(){
install -Dm644 ${srcdir}/auto.master ${pkgdir}/etc/autofs/auto.master || return 1
install -Dm644 ${srcdir}/auto.misc ${pkgdir}/etc/autofs/auto.misc || return 1
+ install -Dm755 ${srcdir}/autofs ${pkgdir}/etc/rc.d/autofs || return 1
install -Dm644 ${srcdir}/autofs.conf.d ${pkgdir}/etc/conf.d/autofs || return 1
- mkdir -p ${pkgdir}/etc/sv/autofs/supervise
- mkdir -p ${pkgdir}/etc/sv/autofs/log/supervise
- install -Dm744 ${srcdir}/run ${pkgdir}/etc/sv/autofs || return 1
- install -Dm744 ${srcdir}/finish ${pkgdir}/etc/sv/autofs || return 1
- install -Dm744 ${srcdir}/log.run ${pkgdir}/etc/sv/autofs/log/run || return 1
}
-
-md5sums=('a1d262cb6ebef0c2dd0fe22232fb3d5a'
- '47f597c870410055e0fdb66103daf928'
- 'a6cefb591e77b31b79dbb7243646c96b'
- 'd8a15ec9186c5c0b36e5cea1e2739e8a'
- 'efd46b6406b940cb48f7c6197790fb8e'
- 'f2048c24da7fa1421c2e8b0b90fb17f9'
- '518e277f960a1af837ba6c5cca13c615'
- '5b30948886b6d71287652d784fccf1fb')
diff --git a/abs/extra-testing/autofs/autofs b/abs/extra-testing/autofs/autofs
new file mode 100644
index 0000000..08bd3e1
--- /dev/null
+++ b/abs/extra-testing/autofs/autofs
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+daemon_name=autofs
+
+. /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 $daemon_name daemon"
+ [ -z "$PID" ] && /usr/sbin/automount $daemonoptions &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+ restart)
+ stat_busy "Restarting $daemon_name daemon"
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+exit 0