[Ocfs2-tools-commits] smushran commits r1107 - in
branches/ocfs2-tools-1.0: extras vendor/common
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Nov 2 13:38:40 CST 2005
Author: smushran
Date: 2005-11-02 13:38:38 -0600 (Wed, 02 Nov 2005)
New Revision: 1107
Added:
branches/ocfs2-tools-1.0/vendor/common/ocfs2.init
Modified:
branches/ocfs2-tools-1.0/extras/watch-hb.sh
Log:
ocfs2.init added
Modified: branches/ocfs2-tools-1.0/extras/watch-hb.sh
===================================================================
--- branches/ocfs2-tools-1.0/extras/watch-hb.sh 2005-11-02 19:36:59 UTC (rev 1106)
+++ branches/ocfs2-tools-1.0/extras/watch-hb.sh 2005-11-02 19:38:38 UTC (rev 1107)
@@ -35,6 +35,6 @@
die "a region must be specified with -r or a device with -d"
watch -n 3 -d \
- "echo \"cat //heartbeat\" | debugfs.ocfs2 $device 2>/dev/null \
+ "echo \"cat //heartbeat\" | debugfs.ocfs2 -n $device 2>/dev/null \
| od -A d -x | \
awk '( NF > 2 ) { \$(1) = \$1 / $slot_bytes; if (\$1 == int(\$1)) print \$0 }'"
Added: branches/ocfs2-tools-1.0/vendor/common/ocfs2.init
===================================================================
--- branches/ocfs2-tools-1.0/vendor/common/ocfs2.init 2005-11-02 19:36:59 UTC (rev 1106)
+++ branches/ocfs2-tools-1.0/vendor/common/ocfs2.init 2005-11-02 19:38:38 UTC (rev 1107)
@@ -0,0 +1,97 @@
+#! /bin/bash
+# Copyright (c) 2005 Oracle
+# All rights reserved.
+#
+# /etc/init.d/ocfs2
+#
+### BEGIN INIT INFO
+# Provides: ocfs2
+# Required-Start: $network $portmap o2cb
+# Required-Stop:
+# X-UnitedLinux-Should-Start:
+# X-UnitedLinux-Should-Stop:
+# Default-Start: 3 5
+# Default-Stop:
+# Description: Mounts OCFS2 volumes
+### END INIT INFO
+
+. /etc/rc.status
+
+OCFS2MNTS=`LC_ALL=C awk '$3 == "ocfs2" { print $2 }' /proc/mounts`
+OCFS2FSTAB=`LC_ALL=C awk '!/^#/ && $3 == "ocfs2" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
+FUSER=`which fuser`
+
+rc_reset
+case "$1" in
+ start|reload)
+ echo -n "Starting Oracle Cluster File System (OCFS2)"
+ if [ -n "$OCFS2FSTAB" ] ; then
+ mount -at ocfs2 2>/dev/null
+ rc_status
+ rc_status -v
+ else
+ rc_status -u
+ fi
+ ;;
+ stop)
+ echo -n "Stopping Oracle Cluster File System (OCFS2)"
+ ocfs2mnts=$OCFS2MNTS
+ if [ -n "$ocfs2mnts" ] ; then
+ retry=3
+ while [ -n "$ocfs2mnts" -a "$retry" -gt 0 ]
+ do
+ if [ "$retry" -lt 3 ]; then
+ echo -n "Retry stopping Oracle Cluster File System (OCFS2)"
+ fi
+ umount -a -t ocfs2 2>/dev/null
+ sleep 1
+ ocfs2mnts=`LC_ALL=C awk '$3 == "ocfs2" { print $2 }' /proc/mounts`
+ [ -z "$ocfs2mnts" ] && break
+ rc_failed 1
+ rc_status -v
+ $FUSER -km $ocfs2mnts >/dev/null
+ sleep 1
+ retry=$(($retry - 1))
+ done
+ fi
+ if [ -n "$ocfs2mnts" ] ; then
+ rc_failed 1
+ else
+ rc_failed 0
+ fi
+ rc_status -v
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ status)
+ if [ -f /proc/mounts ] ; then
+ [ -n "$OCFS2FSTAB" ] && {
+ echo "Configured OCFS2 mountpoints: " $OCFS2FSTAB
+ }
+
+ [ -n "$OCFS2MNTS" ] && {
+ echo "Active OCFS2 mountpoints: " $OCFS2MNTS
+ }
+ rc_reset
+ else
+ rc_failed 3
+ rc_status -v
+ fi
+ ;;
+ try-restart|condrestart)
+ $0 status
+ if test $? = 0; then
+ $0 restart
+ else
+ rc_reset
+ fi
+ rc_status
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|reload|force-reload|restart|try-restart}"
+ exit 1
+esac
+rc_exit
Property changes on: branches/ocfs2-tools-1.0/vendor/common/ocfs2.init
___________________________________________________________________
Name: svn:executable
+ *
More information about the Ocfs2-tools-commits
mailing list