]> git.pld-linux.org Git - packages/autofs.git/commitdiff
- support for autofs.sysconfig
authorwaszi <waszi@pld-linux.org>
Mon, 28 Feb 2000 08:10:53 +0000 (08:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    autofs-auto.master -> 1.2
    autofs.init -> 1.11
    autofs.spec -> 1.20
    autofs.sysconfig -> 1.1

autofs-auto.master
autofs.init
autofs.spec
autofs.sysconfig [new file with mode: 0644]

index 25a852f36e10c6ab4dbcd8c3a4a17bdb0a4eff60..ddde2fb255e63ab0036fb70ffb48a449c4a3eea4 100644 (file)
@@ -3,5 +3,5 @@
 # Format of this file:
 # mountpoint map options
 # For details of the format look at autofs(8).
-/misc  auto.misc               --timeout 60
+/misc  auto.misc
 /net   auto.net
index 6bb58969e24c02e67da05772ef30f66a5eaae132..0e97437080221d04aaee2d95318a8f21c7d99ba1 100644 (file)
 # Get network config
 . /etc/sysconfig/network
 
+# Demon specified configuration.
+. /etc/sysconfig/autofs
+
 # Check that networking is up.
 if [ "${NETWORKING}" = "no" ]; then
        echo "WARNING: Networking is down. Autofs service can't be runed."
        exit 1
 fi
 
-DAEMON=usr/sbin/automount
-
-#      We can add local options here
-#      e.g. localoptions='rsize=8192,wsize=8192'
-#
-localoptions=''
+DAEMON=/usr/sbin/automount
 
 #
 #      This function will build a list of automount commands to execute in
@@ -53,11 +51,11 @@ then
                map=`echo "/etc/autofs/$map" | sed -e 's:^/etc\/autofs//:/:'`
                options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'`
                if [ -x $map ]; then
-                   echo "$DAEMON $daemonoptions $dir program $map $options $localoptions"
+                   echo "$DAEMON --timeout $TIMEOUT $dir program $map $options"
                elif [ -f $map ]; then
-                   echo "$DAEMON $daemonoptions $dir file $map $options $localoptions"
+                   echo "$DAEMON --timeout $TIMEOUT $dir file $map $options"
                else
-                   echo "$DAEMON $daemonoptions $dir `basename $map` $options $localoptions"
+                   echo "$DAEMON --timeout $TIMEOUT $dir `basename $map` $options"
                fi
            fi
        done
@@ -83,7 +81,7 @@ then
                 options=`echo "$options" | sed -e '
                   s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g
                   s/\(^\|[ \t]\)-/\1/g'`
-               echo "$DAEMON $daemonoptions $mountoptions $dir yp $map $options $localoptions"
+               echo "$DAEMON --timeout $TIMEOUT $mountoptions $dir yp $map $options"
            fi
        done
     )
index dee46ebf7f2c51ab0ace9d6aa2c5371dac24d51f..8762b12f140896dfb9f4401eb6f3078dc59cdf0c 100644 (file)
@@ -15,6 +15,7 @@ Source2:      autofs-auto.master
 Source3:       autofs-auto.misc
 Source4:       autofs-auto.mnt
 Source5:       autofs-auto.net
+Source6:       autofs.sysconfig
 Buildroot:     /tmp/%{name}-%{version}-root
 Prereq:                /sbin/chkconfig
 Requires:      mktemp
@@ -60,7 +61,7 @@ make
 rm -rf $RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT/{misc,net,%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \
-       $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs}
+       $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs,sysconfig}
 
 make install \
        INSTALLROOT=$RPM_BUILD_ROOT
@@ -71,6 +72,7 @@ install %{SOURCE2}    $RPM_BUILD_ROOT/etc/autofs/auto.master
 install %{SOURCE3}     $RPM_BUILD_ROOT/etc/autofs/auto.misc
 install %{SOURCE4}     $RPM_BUILD_ROOT/etc/autofs/auto.mnt
 install %{SOURCE5}     $RPM_BUILD_ROOT/etc/autofs/auto.net
+install %{SOURCE6}     $RPM_BUILD_ROOT/etc/sysconfig/autofs
 
 touch                  $RPM_BUILD_ROOT/etc/autofs/auto.{home,misc,var,tmp}
 
@@ -104,13 +106,14 @@ rm -rf $RPM_BUILD_ROOT
 
 %attr(754,root,root) %config /etc/rc.d/init.d/autofs
 %dir %{_sysconfdir}
-%attr(644,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/auto.home
-%attr(644,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/auto.master
-%attr(644,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/auto.misc
-%attr(644,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/auto.mnt
-%attr(755,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/auto.net
-%attr(644,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/auto.tmp
-%attr(644,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/auto.var
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/autofs
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/auto.home
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/auto.master
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/auto.misc
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/auto.mnt
+%attr(750,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/auto.net
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/auto.tmp
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/auto.var
 %attr(755,root,root) %{_sbindir}/automount
 
 %dir /misc
diff --git a/autofs.sysconfig b/autofs.sysconfig
new file mode 100644 (file)
index 0000000..27c7e51
--- /dev/null
@@ -0,0 +1,6 @@
+#
+# Set the minimum timeout, in seconds, until directories are unmounted. The
+# default is 60 seconds. Setting the timeout to zero  disables unmounts
+# completely.
+#
+TIMEOUT=60
This page took 0.083146 seconds and 4 git commands to generate.