summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services/autofs/run
blob: d6659c4a92c78718be124e9d08cac252934c3008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
exec 2>&1

. /etc/rc.conf
. /etc/rc.d/functions

stat_runit "Starting autofs4 kernel module" && echo ""
set -e  # barf if modprobe fails
/usr/bin/modprobe autofs4

stat_runit "Starting autofs automount" && echo ""
# source application-specific settings
[ -f /etc/conf.d/autofs ] && . /etc/conf.d/autofs

if [ ! -z "$TIMEOUT" ]; then
  daemonoptions="--timeout=$TIMEOUT $daemonoptions"
fi

exec /usr/bin/automount -f $daemonoptions