cluster gfs/init.d/gfs gfs2/init.d/gfs2
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
gfs/init.d/gfs +4 -4
@@ -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
gfs2/init.d/gfs2 +4 -4
@@ -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