Neue Version V963
git-svn-id: svn://svn.compuextreme.de/Viitor/V963/Viitor_autofs@5933 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
commit
f33a6e7d72
112
etc/init.d/autofs
Normal file
112
etc/init.d/autofs
Normal file
@ -0,0 +1,112 @@
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/network
|
||||
# Script zum start des automount Daemons
|
||||
# Wenn die Datei /etc/sysconfig/auto.master vorhanden ist, wird
|
||||
# der automount Daemon gestartet
|
||||
# Die Timeout Konfiguration erfolg über die Datei /etc/sysconfig/autofstime
|
||||
# (c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
# $Author$
|
||||
# $Date$
|
||||
# $Revision$
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.6 2006/05/19 14:35:53 segler
|
||||
# autofs versteht nun Einträge in /etc/nsswitch.conf und handelt danach
|
||||
#
|
||||
# Revision 1.5 2003/04/19 07:40:38 kueller
|
||||
# Restartfunktion eingebaut
|
||||
#
|
||||
# Revision 1.4 2003/03/16 13:54:59 kueller
|
||||
# Fehler in Schleife die die Dateibasierten Maps einliest - muss FILE, nicht
|
||||
# HEAD Heissen
|
||||
#
|
||||
# Revision 1.3 2002/01/26 20:41:16 kueller
|
||||
# /tmp/autofs wird nun gelöscht, wenn es nicht mehr benötigt wird
|
||||
#
|
||||
# Revision 1.2 2002/01/26 03:55:35 kueller
|
||||
# Auswertung von /etc/sysconfig/auto.master komplett neu geschrieben -
|
||||
# stark vereinfacht!
|
||||
# NIS Support aktiviert - vorhandene nis-auto.master wird nun
|
||||
# ebenfalls ausgewertet, und dort gefundene Maps aus dem NIS gestartet
|
||||
#
|
||||
# Revision 1.1.1.1 2001/09/23 00:10:47 kueller
|
||||
# Neustart wg. Datenverlust
|
||||
#
|
||||
# Revision 1.1.1.1 2001/08/25 16:21:48 kueller
|
||||
# AddOns fuer 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
|
||||
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
|
||||
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`
|
||||
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
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0: {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
#end /etc/inet.d/network
|
31
etc/init/autofs-nis.conf
Normal file
31
etc/init/autofs-nis.conf
Normal file
@ -0,0 +1,31 @@
|
||||
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
|
||||
if [ -f /var/run/autofs/automount_nis.pid ]; then
|
||||
if ps -ef|\
|
||||
grep automount |\
|
||||
grep nis |\
|
||||
awk '{print $2}'|\
|
||||
grep -q `cat /var/run/autofs/automount_nis.pid`; then
|
||||
echo -n "Automount already running"
|
||||
exit 10
|
||||
else
|
||||
rm /var/run/autofs/automount_nis.pid
|
||||
fi
|
||||
fi
|
||||
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
|
32
etc/init/autofs.conf
Normal file
32
etc/init/autofs.conf
Normal file
@ -0,0 +1,32 @@
|
||||
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
|
||||
if [ -f /var/run/autofs/automount_files.pid ]; then
|
||||
if ps -ef|\
|
||||
grep automount |\
|
||||
grep nis |\
|
||||
awk '{print $2}'|\
|
||||
grep -q `cat /var/run/autofs/automount_files.pid`; then
|
||||
echo "Automount already running - not started"
|
||||
exit 10
|
||||
else
|
||||
echo -n "Removing old files"
|
||||
rm /var/run/autofs/automount_files.pid
|
||||
fi
|
||||
fi
|
||||
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
|
23
etc/sysconfig/auto.master
Normal file
23
etc/sysconfig/auto.master
Normal file
@ -0,0 +1,23 @@
|
||||
# sample /etc/sysconfig/auto.master
|
||||
# Generated on 24.12.2000 by (c) RainMaker Multimedia OHG
|
||||
# (c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
# $Author$
|
||||
# $Date$
|
||||
# $Revision$
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.1 2001/09/23 00:10:47 kueller
|
||||
# Initial revision
|
||||
#
|
||||
# Revision 1.2 2001/08/25 16:35:18 kueller
|
||||
#
|
||||
# Datei darf keine Leeren Zeilen enthalten! - Entweder ein gültiger Eintrag,
|
||||
# oder ein # am Zeilenanfang!
|
||||
#
|
||||
# Revision 1.1.1.1 2001/08/25 16:21:48 kueller
|
||||
# AddOns fuer autofs
|
||||
#
|
||||
#
|
||||
/Media /etc/sysconfig/auto.misc
|
||||
#/home /etc/sysconfig/auto.home
|
33
etc/sysconfig/auto.misc
Normal file
33
etc/sysconfig/auto.misc
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
#Beispiel Konfiguration für autofs (/etc/sysconfig/auto.misc)
|
||||
#(c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
#$Author$
|
||||
#$Date$
|
||||
#$Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.2 2007/06/08 13:05:24 kueller
|
||||
#floppy und cdrom eintrag fuer udev korrigiert
|
||||
#
|
||||
#Revision 1.1.1.1 2001/09/23 00:10:47 kueller
|
||||
#Neustart wg. Datenverlust
|
||||
#
|
||||
#Revision 1.3 2001/08/25 20:41:39 kueller
|
||||
#
|
||||
#Pfad für CDROM Device muß /dev/cdroms und nicht /dev/cdrom lauten
|
||||
#
|
||||
#Revision 1.2 2001/08/25 16:35:47 kueller
|
||||
#
|
||||
#cdrom als Mountpoint ist verständlicher
|
||||
#
|
||||
#Revision 1.1.1.1 2001/08/25 16:21:48 kueller
|
||||
#AddOns fuer autofs
|
||||
#
|
||||
#
|
||||
|
||||
#kernel -ro ftp.kernel.org:/pub/linux
|
||||
#boot -fstype=ext2 :/dev/hda1
|
||||
#removable -fstype=ext2 :/dev/hdd
|
||||
cdrom -fstype=iso9660,ro :/dev/sr0
|
||||
floppy -fstype=auto :/dev/floppy/fd0
|
1
etc/sysconfig/autofstime
Normal file
1
etc/sysconfig/autofstime
Normal file
@ -0,0 +1 @@
|
||||
3
|
41
init/genpkg
Normal file
41
init/genpkg
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
#genpkg script für automounter
|
||||
#(c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
#$Author$
|
||||
#$Date$
|
||||
#$Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.4 2002/09/11 18:19:09 hkueller
|
||||
#S13 auf S14 geändert. autofs muss nach ypclient gestartet werden!
|
||||
#
|
||||
#Revision 1.3 2002/01/26 05:24:09 kueller
|
||||
#Startzeitpunkt für autofs nach nis gelegt - damit nismaps verwendet werden
|
||||
#können
|
||||
#
|
||||
#Revision 1.2 2001/10/17 08:19:25 kueller
|
||||
#rechtekorrektur für autofs
|
||||
#
|
||||
#Revision 1.1.1.1 2001/09/23 00:10:47 kueller
|
||||
#Neustart wg. Datenverlust
|
||||
#
|
||||
#
|
||||
|
||||
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
|
||||
cd rc$i.d
|
||||
ln -s ../autofs K75autofs
|
||||
cd ..
|
||||
done
|
||||
for i in 2 3 4 5; do
|
||||
cd rc$i.d
|
||||
ln -s ../autofs S14autofs
|
||||
cd ..
|
||||
done
|
||||
cd $WDIR
|
||||
fi
|
Loading…
Reference in New Issue
Block a user