Compare commits
No commits in common. "v963" and "v961" have entirely different histories.
@ -39,65 +39,52 @@
|
||||
#
|
||||
|
||||
|
||||
source /etc/sysconfig/autofstime
|
||||
source /etc/init.d/functions
|
||||
initmount()
|
||||
{
|
||||
MOUNTSOURCE=$1
|
||||
AUTOMOUNTSOURCE=$2
|
||||
|
||||
|
||||
sed -e '/^#/d' |\
|
||||
sed -e '/^ *$/d' >/tmp/autofs
|
||||
exec 3</tmp/autofs
|
||||
read <&3 MOUNTPOINT FILE
|
||||
while [ "$MOUNTPOINT" ]; do
|
||||
echo -n "starting automount for $MOUNTPOINT ($MOUNTSOURCE)"
|
||||
automount -t $TIMEOUT $MOUNTPOINT $AUTOMOUNTSOURCE,sun $FILE
|
||||
evaluate_retval
|
||||
read <&3 MOUNTPOINT FILE
|
||||
done
|
||||
exec 3>&-
|
||||
rm /tmp/autofs
|
||||
}
|
||||
|
||||
source /etc/sysconfig/autofstime
|
||||
|
||||
source /etc/init.d/functions
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -f /etc/sysconfig/auto.master ] && grep automount /etc/nsswitch.conf|grep -q files; then
|
||||
if [ -f /var/run/autofs/automount_files.pid ]; then
|
||||
if ps -ef|awk '{print $2}'|grep -q `cat /var/run/autofs/automount_files.pid`; then
|
||||
echo -n "Automount already running"
|
||||
print_status failure
|
||||
exit 10
|
||||
else
|
||||
echo -n "Removing old files"
|
||||
rm /var/run/autofs/automount_files.pid
|
||||
if [ -f /etc/nsswitch.conf ]; then
|
||||
for MOUNTSOURCE in `grep automount /etc/nsswitch.conf | awk '{ $1=""; print; };'`; do
|
||||
case "$MOUNTSOURCE" in
|
||||
files)
|
||||
if [ -f /etc/sysconfig/auto.master ]; then
|
||||
cat /etc/sysconfig/auto.master| initmount files file
|
||||
fi
|
||||
fi
|
||||
echo -n "Starting automount for local auto.master"
|
||||
automount -v -p /var/run/autofs/automount_files.pid -t $TIMEOUT /etc/sysconfig/auto.master
|
||||
evaluate_retval
|
||||
fi
|
||||
if grep automount /etc/nsswitch.conf|grep -q nis; then
|
||||
if [ -f /var/run/autofs/automount_nis.pid ]; then
|
||||
if ps -ef|awk '{print $2}'|grep -q `cat /var/run/autofs/automount_nis.pid`; then
|
||||
echo -n "Automount for nis already running"
|
||||
print_status failure
|
||||
exit 10
|
||||
else
|
||||
echo -n "Removing old files"
|
||||
rm /var/run/autofs/automount_nis.pid
|
||||
fi
|
||||
fi
|
||||
echo -n "Starting automount for nis"
|
||||
automount -C -v -v -p /var/run/autofs/automount_nis.pid -t $TIMEOUT auto.master
|
||||
evaluate_retval
|
||||
;;
|
||||
nis)
|
||||
ypcat -k auto.master 2>/dev/null| initmount nis yp
|
||||
;;
|
||||
default)
|
||||
echo "no such source for automount: "$MOUNTSOURCE
|
||||
esac
|
||||
done
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ -f /var/run/autofs/automount_files.pid ]; then
|
||||
if ps -ef|awk '{print $2}'|grep -q `cat /var/run/autofs/automount_files.pid`; then
|
||||
echo -n "shutting down autofs"
|
||||
kill `cat /var/run/autofs/automount_files.pid`
|
||||
pkill automount
|
||||
evaluate_retval
|
||||
else
|
||||
echo -n "PID `cat /var/run/autofs/automount_files.pid` not existing - cleaning up"
|
||||
rm /var/run/autofs/automount_files.pid
|
||||
evaluate_retval
|
||||
fi
|
||||
fi
|
||||
if [ -f /var/run/autofs/automount_nis.pid ]; then
|
||||
if ps -ef|awk '{print $2}'|grep -q `cat /var/run/autofs/automount_nis.pid`; then
|
||||
echo -n "shutting down autofs"
|
||||
kill `cat /var/run/autofs/automount_nis.pid`
|
||||
evaluate_retval
|
||||
else
|
||||
echo -n "PID `cat /var/run/autofs/automount_nis.pid` not existing - cleaning up"
|
||||
rm /var/run/autofs/automount_nis.pid
|
||||
evaluate_retval
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
|
@ -1,20 +0,0 @@
|
||||
description "Startup autofs System for nis configuration files"
|
||||
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||||
version 1.0
|
||||
emits none special
|
||||
|
||||
start on ( runlevel [2345] and ( started ypclient ))
|
||||
stop on stopping ypclient
|
||||
|
||||
console output
|
||||
|
||||
pre-start script
|
||||
source /etc/init/functions
|
||||
if grep automount /etc/nsswitch.conf|grep -q nis; then
|
||||
/sbin/CheckPid /var/run/autofs/automount_nis.pid
|
||||
else
|
||||
exit 10
|
||||
fi
|
||||
end script
|
||||
|
||||
exec automount -f -C -p /var/run/autofs/automount_nis.pid -t `cat /etc/sysconfig/autofstime` nis:auto.master
|
@ -1,20 +0,0 @@
|
||||
description "Startup autofs System for local configuration files"
|
||||
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||||
version 1.0
|
||||
emits none special
|
||||
|
||||
start on (runlevel [2345] and (started mountfs))
|
||||
stop on runlevel [016]
|
||||
|
||||
console none
|
||||
|
||||
pre-start script
|
||||
source /etc/init/functions
|
||||
if [ -f /etc/sysconfig/auto.master ] && grep automount /etc/nsswitch.conf|grep -q files; then
|
||||
CheckPid /var/run/autofs/automount_files.pid
|
||||
else
|
||||
exit 10
|
||||
fi
|
||||
end script
|
||||
|
||||
exec automount -f -p /var/run/autofs/automount_files.pid -t `cat /etc/sysconfig/autofstime` /etc/sysconfig/auto.master
|
@ -1 +1,19 @@
|
||||
3
|
||||
#!/bin/bash
|
||||
#Definition der Timeout Zeit für autofs. Nach $TIMEOUT Sekunden nicht
|
||||
#benutzt werden, wird ein autofs mount wieder dismounted
|
||||
#(c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
#$Author$
|
||||
#$Date$
|
||||
#$Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.1 2001/09/23 00:10:47 kueller
|
||||
#Initial revision
|
||||
#
|
||||
#Revision 1.1.1.1 2001/08/25 16:21:48 kueller
|
||||
#AddOns fuer autofs
|
||||
#
|
||||
#
|
||||
|
||||
TIMEOUT=3
|
||||
|
20
init/genpkg
20
init/genpkg
@ -22,20 +22,18 @@
|
||||
#
|
||||
#
|
||||
|
||||
if [ -d /var/install/sysvinit* ]; then
|
||||
WDIR=`pwd`
|
||||
cd etc/init.d
|
||||
chmod 755 autofs
|
||||
mkdir rc{0,1,2,3,4,5,6}.d
|
||||
for i in 0 1 6; do
|
||||
WDIR=`pwd`
|
||||
cd etc/init.d
|
||||
chmod 755 autofs
|
||||
mkdir rc{0,1,2,3,4,5,6}.d
|
||||
for i in 0 1 6; do
|
||||
cd rc$i.d
|
||||
ln -s ../autofs K75autofs
|
||||
cd ..
|
||||
done
|
||||
for i in 2 3 4 5; do
|
||||
done
|
||||
for i in 2 3 4 5; do
|
||||
cd rc$i.d
|
||||
ln -s ../autofs S14autofs
|
||||
cd ..
|
||||
done
|
||||
cd $WDIR
|
||||
fi
|
||||
done
|
||||
cd $WDIR
|
||||
|
Loading…
Reference in New Issue
Block a user