Logoj0ke.net Open Build Service > Projects > GFS > cluster2 > cluster-gfs-init.patch
Sign Up | Log In

File cluster-gfs-init.patch of Package cluster2 (Revision 0078a90d58cd7015ecd93a2db76f37d3)

Currently displaying revision 0078a90d58cd7015ecd93a2db76f37d3, show latest

x
 
1
--- gfs/init.d/gfs.orig 2008-12-30 21:50:56.000000000 +0100
2
+++ gfs/init.d/gfs  2009-03-30 10:05:43.000000000 +0200
3
@@ -9,13 +9,26 @@
4
 # Provides:        gfs
5
 # Required-Start:  $network cman
6
 # Required-Stop:   $network cman
7
-# Default-Start:
8
+# Default-Start:   2 3 5
9
 # Default-Stop:
10
 # Short-Description:   mount/unmount gfs filesystems configured in /etc/fstab
11
 # Description:     mount/unmount gfs filesystems configured in /etc/fstab
12
 ### END INIT INFO
13
 
14
-. /etc/init.d/functions
15
+. /etc/rc.status
16
+
17
+# Shell functions sourced from /etc/rc.status:
18
+#      rc_check         check and set local and overall rc status
19
+#      rc_status        check and set local and overall rc status
20
+#      rc_status -v     ditto but be verbose in local rc status
21
+#      rc_status -v -r  ditto and clear the local rc status
22
+#      rc_failed        set local and overall rc status to failed
23
+#      rc_reset         clear local rc status (overall remains)
24
+#      rc_exit          exit appropriate to overall rc status
25
+
26
+# First reset status of this service
27
+rc_reset
28
+
29
 [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
30
 
31
 #
32
@@ -30,6 +43,7 @@
33
         if [ -n "$GFSFSTAB" ] 
34
    then
35
        action $"Mounting GFS filesystems: " mount -a -t gfs
36
+       rc_status
37
    fi
38
    touch /var/lock/subsys/gfs
39
    ;;
40
@@ -61,6 +75,7 @@
41
    fi
42
 
43
    modprobe -r gfs
44
+   rc_status
45
    rm -f /var/lock/subsys/gfs
46
    ;;
47
 
48
@@ -77,7 +92,9 @@
49
        }
50
    else
51
        echo "/proc filesystem unavailable"
52
+       rc_failed
53
    fi
54
+   rc_status
55
    ;;
56
 
57
   restart)
58
@@ -93,4 +110,4 @@
59
    exit 1
60
 esac
61
 
62
-exit 0
63
+rc_exit
64