From 54935de148238fa372a1e88a731abfcb1e936e4e Mon Sep 17 00:00:00 2001 From: Peter Vrabec Date: Wed, 5 Oct 2005 16:26:58 +0000 Subject: [PATCH] - upgrade - fix amd shutdown(#158268,#54246) - enhancement, /host/localhost and /host/ are symlinks to / (#11843) --- .cvsignore | 2 +- am-utils.init | 54 ++++++++++++++++++++++-------------------------- am-utils.net.map | 7 +++++-- am-utils.spec | 17 ++++++++------- sources | 2 +- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/.cvsignore b/.cvsignore index d4079c8..c4210b7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -am-utils-6.1.1.tar.gz +am-utils-6.1.2.1.tar.gz diff --git a/am-utils.init b/am-utils.init index 17a858b..2d5a1a8 100755 --- a/am-utils.init +++ b/am-utils.init @@ -36,35 +36,31 @@ start() { } stop() { - echo -n $"Stopping $prog: " - delay=5 - count=10 - i=1 - is_down="nope" - while [ $i != $count ]; do - # run amq - /usr/sbin/amq > /dev/null 2>&1 - if [ $? = 0 ] ; then - # amd is up - /usr/sbin/amq | awk '{print $1}' | xargs -n 1 /usr/sbin/amq -uf - else - # amd is down - is_down="" - break - fi - /usr/sbin/amq > /dev/null 2>&1 - if [ $? != 0 ] ; then - sleep $delay - fi - i=`expr $i + 1` - done - if [ -n "$is_down" ] ; then - killproc $amd - RETVAL=$? - fi - [ $RETVAL = 0 ] && rm -f /var/lock/subsys/amd - echo - return $RETVAL + echo -n $"Stopping $prog: " + killproc $amd -TERM + # this part is from wait4amd2die + delay=3 + count=10 + i=1 + maxcount=`expr $count + 1` + while [ $i != $maxcount ]; do + # run amq + /usr/sbin/amq > /dev/null 2>&1 + RETVAL=$? + if [ $RETVAL != 0 ] + then + # amq failed to run (because amd is dead) + rm -f /var/lock/subsys/amd /var/run/amd.pid + echo + return $RETVAL + fi + sleep $delay + i=`expr $i + 1` + done + failure $"amd shutdown" + echo + echo "amd is still up" + return $RETVAL } # See how we were called. diff --git a/am-utils.net.map b/am-utils.net.map index a9fb93a..2307d9a 100644 --- a/am-utils.net.map +++ b/am-utils.net.map @@ -1,2 +1,5 @@ -/defaults fs:=${autodir}/${rhost}/root/${rfs};type:=host;opts:=nosuid,nodev -* rhost:=${key};rfs:=/ +localhost type:=link;fs:=/ +* host==${key};type:=link;fs:=/ \ + hostd==${key};type:=link;fs:=/ \ + fs:=${autodir}/${rhost}/root/${rfs};type:=host;rhost:=${key};rfs:=/;opts:=nosuid,nodev + diff --git a/am-utils.spec b/am-utils.spec index 11890c3..31a720e 100644 --- a/am-utils.spec +++ b/am-utils.spec @@ -1,7 +1,7 @@ Summary: Automount utilities including an updated version of Amd. Name: am-utils -Version: 6.1.1 -Release: 3 +Version: 6.1.2.1 +Release: 1 License: BSD Epoch: 5 Group: System Environment/Daemons @@ -11,7 +11,7 @@ Source1: am-utils.init Source2: am-utils.conf Source3: am-utils.sysconf Source4: am-utils.net.map -Patch1: am-utils-6.1.1-linuxNfsMountCheck.patch +Patch1: am-utils-6.1.2.1-unregAmd.patch BuildRoot: %{_tmppath}/%{name}-root BuildPrereq: gdbm-devel, hesiod-devel, openldap-devel autoconf automake libtool Requires: portmap, grep, gawk, findutils @@ -35,8 +35,8 @@ mounting and unmounting filesystems. %prep %setup -q -%patch1 -p1 -b .linuxNfsMountCheck -autoconf +%patch1 -p1 -b .unregAmd + find_requires=%{old_find_requires} echo "$find_requires | grep -v lostaltmail.conf" > find-requires @@ -131,8 +131,11 @@ fi %{_libdir}/libamu.so* %changelog -* Tue Sep 27 2005 Peter Vrabec 6.1.1-3 -- specify type option in /default in /etc/amd.net (#11618) +* Wed Oct 04 2005 Peter Vrabec 6.1.2.1-1 +- upgrade +- fix amd shutdown(#158268,#54246) +- enhancement, /host/localhost and /host/ + are symlinks to / (#11843) * Thu Aug 25 2005 Peter Vrabec 6.1.1-2 - use generic linux/nfs_mount.h check diff --git a/sources b/sources index 5794ac2..ad4d127 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d80262aff0f66cac815d963556526257 am-utils-6.1.1.tar.gz +ac781b1e7db007c7379a90843e37f229 am-utils-6.1.2.1.tar.gz