From 25d4840e95d5e669f9e09ce23615eaa5051a247e Mon Sep 17 00:00:00 2001 From: Unconfigured Date: Mon, 28 Jun 2010 13:29:55 -0500 Subject: autofs: Updated sv run to manage automount; removed finish and /etc/rc.d/autofs; added logger. closes #704 --- abs/extra-testing/autofs/Changelog | 2 ++ abs/extra-testing/autofs/PKGBUILD | 26 +++++++++++------------ abs/extra-testing/autofs/autofs | 43 -------------------------------------- abs/extra-testing/autofs/finish | 3 --- abs/extra-testing/autofs/log.run | 2 ++ abs/extra-testing/autofs/run | 11 +++++++++- 6 files changed, 27 insertions(+), 60 deletions(-) mode change 100644 => 100755 abs/extra-testing/autofs/Changelog mode change 100644 => 100755 abs/extra-testing/autofs/PKGBUILD delete mode 100644 abs/extra-testing/autofs/autofs delete mode 100755 abs/extra-testing/autofs/finish create mode 100755 abs/extra-testing/autofs/log.run diff --git a/abs/extra-testing/autofs/Changelog b/abs/extra-testing/autofs/Changelog old mode 100644 new mode 100755 index f25555e..7807b97 --- a/abs/extra-testing/autofs/Changelog +++ b/abs/extra-testing/autofs/Changelog @@ -1,2 +1,4 @@ 5.0.4-5 4/29/09 Cecil - Added run and finish files for runit. +6/28/10 +Britney - Updated run to manage automount; removed finish and /etc/rc.d/autofs; added logger diff --git a/abs/extra-testing/autofs/PKGBUILD b/abs/extra-testing/autofs/PKGBUILD old mode 100644 new mode 100755 index 7524ae4..a06e83d --- a/abs/extra-testing/autofs/PKGBUILD +++ b/abs/extra-testing/autofs/PKGBUILD @@ -5,7 +5,7 @@ pkgname=autofs pkgver=5.0.4 -pkgrel=5 +pkgrel=6 pkgdesc="A kernel-based automounter for Linux." arch=('i686' 'x86_64') url="http://wiki.autofs.net/FrontPage" @@ -14,16 +14,8 @@ 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') + 'autofs.conf.d' 'auto.master' 'auto.misc' + 'heimdal.patch' 'run' 'log.run') build() { export MAKEFLAGS="-j1" @@ -45,10 +37,18 @@ build() { 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 + mkdir -p ${pkgdir}/etc/sv/autofs/log/supervise install -D -m 744 ${srcdir}/run ${pkgdir}/etc/sv/autofs - install -D -m 744 ${srcdir}/finish ${pkgdir}/etc/sv/autofs + install -D -m 744 ${srcdir}/log.run ${pkgdir}/etc/sv/autofs/log/run } # vim: ts=2 sw=2 et ft=sh + +md5sums=('2646dde61edd08dd952255558c733c08' + '47f597c870410055e0fdb66103daf928' + 'a6cefb591e77b31b79dbb7243646c96b' + 'd8a15ec9186c5c0b36e5cea1e2739e8a' + '1ee4825e26ad72bfe86acec3d3da5d2a' + 'de5341a56e0c6c5ec89ed361f9107b3b' + '518e277f960a1af837ba6c5cca13c615') diff --git a/abs/extra-testing/autofs/autofs b/abs/extra-testing/autofs/autofs deleted file mode 100644 index 59ea4f5..0000000 --- a/abs/extra-testing/autofs/autofs +++ /dev/null @@ -1,43 +0,0 @@ -#!/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-testing/autofs/finish b/abs/extra-testing/autofs/finish deleted file mode 100755 index 26f9d19..0000000 --- a/abs/extra-testing/autofs/finish +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -exec 2>&1 -sv down autofs diff --git a/abs/extra-testing/autofs/log.run b/abs/extra-testing/autofs/log.run new file mode 100755 index 0000000..d184328 --- /dev/null +++ b/abs/extra-testing/autofs/log.run @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/bin/logger -p info -i -t autofs diff --git a/abs/extra-testing/autofs/run b/abs/extra-testing/autofs/run index b35a4ea..7d146fc 100755 --- a/abs/extra-testing/autofs/run +++ b/abs/extra-testing/autofs/run @@ -2,4 +2,13 @@ exec 2>&1 set -e # barf if modprobe fails /sbin/modprobe autofs4 -exec /etc/rc.d/autofs start +#exec /etc/rc.d/autofs start + +# source application-specific settings +[ -f /etc/conf.d/autofs ] && . /etc/conf.d/autofs + +if [ ! -z "$TIMEOUT" ]; then + daemonoptions="--timeout=$TIMEOUT $daemonoptions" +fi + +exec /usr/sbin/automount -f $daemonoptions -- cgit v0.12