From mboxrd@z Thu Jan 1 00:00:00 1970 From: adas@sourceware.org Date: 4 Aug 2006 19:54:03 -0000 Subject: [Cluster-devel] cluster gfs/init.d/gfs gfs2/init.d/gfs2 Message-ID: <20060804195403.24285.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Changes by: adas at sourceware.org 2006-08-04 19:54:03 Modified files: gfs/init.d : gfs gfs2/init.d : gfs2 Log message: Continuing work on bz 195591. awk matching string for gfs and gfs2 was not right. Was causing the init scripts to go into a loop when both gfs and gfs2 fs were mounted Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs/init.d/gfs.diff?cvsroot=cluster&r1=1.2&r2=1.3 http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/init.d/gfs2.diff?cvsroot=cluster&r1=1.2&r2=1.3 --- cluster/gfs/init.d/gfs 2006/07/10 23:00:05 1.2 +++ cluster/gfs/init.d/gfs 2006/08/04 19:54:03 1.3 @@ -16,8 +16,8 @@ # # This script's behavior is modeled closely after the netfs script. # -GFSFSTAB=$(LC_ALL=C awk '!/^#/ && $3 ~ /^gfs/ && $4 !~ /noauto/ { print $2 }' /etc/fstab) -GFSMTAB=$(LC_ALL=C awk '!/^#/ && $3 ~ /^gfs/ && $2 != "/" { print $2 }' /proc/mounts) +GFSFSTAB=$(LC_ALL=C awk '!/^#/ && $3 == "gfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab) +GFSMTAB=$(LC_ALL=C awk '!/^#/ && $3 == "gfs" && $2 != "/" { print $2 }' /proc/mounts) # See how we were called. case "$1" in @@ -39,7 +39,7 @@ then sig= retry=6 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^gfs/ && $2 != "/" {print $2}' /proc/mounts` + remaining=`LC_ALL=C awk '!/^#/ && $3 == "gfs" && $2 != "/" {print $2}' /proc/mounts` while [ -n "$remaining" -a "$retry" -gt 0 ] do action $"Unmounting GFS filesystems: " umount -a -t gfs @@ -51,7 +51,7 @@ fi sleep 2 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^gfs/ && $2 != "/" {print $2}' /proc/mounts` + remaining=`LC_ALL=C awk '!/^#/ && $3 == "gfs" && $2 != "/" {print $2}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 10 --- cluster/gfs2/init.d/gfs2 2006/07/10 22:17:48 1.2 +++ cluster/gfs2/init.d/gfs2 2006/08/04 19:54:03 1.3 @@ -16,8 +16,8 @@ # # This script's behavior is modeled closely after the netfs script. # -GFS2FSTAB=$(LC_ALL=C awk '!/^#/ && $3 ~ /^gfs2/ && $4 !~ /noauto/ { print $2 }' /etc/fstab) -GFS2MTAB=$(LC_ALL=C awk '!/^#/ && $3 ~ /^gfs2/ && $2 != "/" { print $2 }' /proc/mounts) +GFS2FSTAB=$(LC_ALL=C awk '!/^#/ && $3 == "gfs2" && $4 !~ /noauto/ { print $2 }' /etc/fstab) +GFS2MTAB=$(LC_ALL=C awk '!/^#/ && $3 == "gfs2" && $2 != "/" { print $2 }' /proc/mounts) # See how we were called. case "$1" in @@ -34,7 +34,7 @@ then sig= retry=6 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^gfs2/ && $2 != "/" {print $2}' /proc/mounts` + remaining=`LC_ALL=C awk '!/^#/ && $3 == "gfs2" && $2 != "/" {print $2}' /proc/mounts` while [ -n "$remaining" -a "$retry" -gt 0 ] do action $"Unmounting GFS2 filesystems: " umount -a -t gfs2 @@ -46,7 +46,7 @@ fi sleep 2 - remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^gfs2/ && $2 != "/" {print $2}' /proc/mounts` + remaining=`LC_ALL=C awk '!/^#/ && $3 == "gfs2" && $2 != "/" {print $2}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining &> /dev/null sleep 10