Der Check ob automount in /etc/nsswitch.conf vorhanden ist funktioniert wieder.
Ausserdem die Prozesserkennung präzisiert. git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_autofs@5834 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
parent
b84f0661d3
commit
db23a575d9
@ -12,13 +12,19 @@ pre-start script
|
|||||||
source /etc/init/functions
|
source /etc/init/functions
|
||||||
if grep automount /etc/nsswitch.conf|grep -q nis; then
|
if grep automount /etc/nsswitch.conf|grep -q nis; then
|
||||||
if [ -f /var/run/autofs/automount_nis.pid ]; 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
|
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"
|
echo -n "Automount already running"
|
||||||
exit 10
|
exit 10
|
||||||
else
|
else
|
||||||
rm /var/run/autofs/automount_nis.pid
|
rm /var/run/autofs/automount_nis.pid
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
exit 10
|
||||||
fi
|
fi
|
||||||
end script
|
end script
|
||||||
|
|
||||||
|
@ -12,7 +12,11 @@ pre-start script
|
|||||||
source /etc/init/functions
|
source /etc/init/functions
|
||||||
if [ -f /etc/sysconfig/auto.master ] && grep automount /etc/nsswitch.conf|grep -q files; then
|
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 [ -f /var/run/autofs/automount_files.pid ]; then
|
||||||
if ps -ef|awk '{print $2}'|grep -q `cat /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"
|
echo "Automount already running - not started"
|
||||||
exit 10
|
exit 10
|
||||||
else
|
else
|
||||||
@ -20,6 +24,8 @@ pre-start script
|
|||||||
rm /var/run/autofs/automount_files.pid
|
rm /var/run/autofs/automount_files.pid
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
exit 10
|
||||||
fi
|
fi
|
||||||
end script
|
end script
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user