2 # Copyright (c) 2005 Oracle
5 # chkconfig: 2345 25 19
6 # description: Mount OCFS2 volumes at boot.
10 # Required-Start: $network o2cb
12 # X-UnitedLinux-Should-Start:
13 # X-UnitedLinux-Should-Stop:
14 # Default-Start: 2 3 5
16 # Description: Mount OCFS2 volumes at boot.
19 if [ -f /etc/redhat-release ]
21 . /etc/init.d/functions
44 elif [ -f /etc/SuSE-release -o -f /etc/UnitedLinux-release ]
95 LC_ALL=C awk '$3 == "ocfs2" { print $2 }' /proc/mounts
100 LC_ALL=C awk '!/^#/ && $3 == "ocfs2" && $4 !~ /noauto/ { print $2 }' /etc/fstab
109 if [ -n "`ocfs2fstab`" ] ; then
110 echo -n "Starting Oracle Cluster File System (OCFS2) "
116 failure_status "Unable to mount OCFS2 filesystems"
121 echo -n "Stopping Oracle Cluster File System (OCFS2) "
122 remaining="`ocfs2mounts`"
125 while [ -n "$remaining" -a "$retry" -gt 0 ]
127 if [ "$retry" -lt 3 ]; then
128 echo -n "Retry stopping Oracle Cluster File System (OCFS2) "
130 umount -a -t ocfs2 2>/dev/null
133 remaining="`ocfs2mounts`"
134 [ -z "$remaining" ] && break
135 failure_status "Unable to unmount OCFS2 filesystems"
137 $FUSER -km $sig $remaining >/dev/null
139 retry=$(($retry - 1))
142 [ -z "$remaining" ] && success_status
144 restart|force-reload)
149 if [ -f /proc/mounts ] ; then
150 [ -n "`ocfs2fstab`" ] && {
151 echo "Configured OCFS2 mountpoints: " `ocfs2fstab`
154 [ -n "`ocfs2mounts`" ] && {
155 echo "Active OCFS2 mountpoints: " `ocfs2mounts`
158 echo -n "Checking OCFS2 mountpoints: "
162 try-restart|condrestart)
169 echo "Usage: $0 {start|stop|status|reload|force-reload|restart|try-restart}"