From db23a575d9a4a57408f92cd2befe584fd784deb8 Mon Sep 17 00:00:00 2001 From: kueller Date: Sun, 10 Oct 2010 13:48:05 +0000 Subject: [PATCH] =?UTF-8?q?Der=20Check=20ob=20automount=20in=20/etc/nsswit?= =?UTF-8?q?ch.conf=20vorhanden=20ist=20funktioniert=20wieder.=20Ausserdem?= =?UTF-8?q?=20die=20Prozesserkennung=20pr=C3=A4zisiert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_autofs@5834 504e572c-2e33-0410-9681-be2bf7408885 --- etc/init/autofs-nis.conf | 8 +++++++- etc/init/autofs.conf | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/etc/init/autofs-nis.conf b/etc/init/autofs-nis.conf index cdc5fd6..7a51710 100644 --- a/etc/init/autofs-nis.conf +++ b/etc/init/autofs-nis.conf @@ -12,13 +12,19 @@ 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|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" exit 10 else rm /var/run/autofs/automount_nis.pid fi fi + else + exit 10 fi end script diff --git a/etc/init/autofs.conf b/etc/init/autofs.conf index 2b3a9c8..ef63de1 100644 --- a/etc/init/autofs.conf +++ b/etc/init/autofs.conf @@ -12,7 +12,11 @@ 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|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" exit 10 else @@ -20,6 +24,8 @@ pre-start script rm /var/run/autofs/automount_files.pid fi fi + else + exit 10 fi end script