ba2ae35d8f
Add systemd support for o2cb and ocfs2 service. 1. I've tested changes on opensuse13.2 and sle12 sp1. It works well. 2. Backforward compatible. 3. It will be added into sle12 once it become mature in opensuse. OBS-URL: https://build.opensuse.org/request/show/330115 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=84
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
From: Junxiao Bi <junxiao.bi@oracle.com>
|
|
To: <ocfs2-tools-devel@oss.oracle.com>
|
|
Date: 6/29/2015 4:29 PM
|
|
Subject: [Ocfs2-tools-devel] [PATCH 3/6] o2cb: don't write sysconfig if status not changed
|
|
|
|
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
|
|
---
|
|
vendor/common/o2cb.init.sh | 16 ++++++++++------
|
|
1 file changed, 10 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh
|
|
index 9e0b31c..e2f80f7 100755
|
|
--- a/vendor/common/o2cb.init.sh
|
|
+++ b/vendor/common/o2cb.init.sh
|
|
@@ -1925,16 +1925,20 @@ case "$1" in
|
|
;;
|
|
|
|
enable)
|
|
- O2CB_ENABLED=true
|
|
- write_sysconfig
|
|
- if_fail "$?" "Unable to write the driver configuration"
|
|
+ if [ "$O2CB_ENABLED" != "true" ]; then
|
|
+ O2CB_ENABLED=true
|
|
+ write_sysconfig
|
|
+ if_fail "$?" "Unable to write the driver configuration"
|
|
+ fi
|
|
start
|
|
;;
|
|
|
|
disable)
|
|
- O2CB_ENABLED=false
|
|
- write_sysconfig
|
|
- if_fail "$?" "Unable to write the driver configuration"
|
|
+ if [ "$O2CB_ENABLED" != "false" ]; then
|
|
+ O2CB_ENABLED=false
|
|
+ write_sysconfig
|
|
+ if_fail "$?" "Unable to write the driver configuration"
|
|
+ fi
|
|
stop
|
|
;;
|
|
|
|
--
|
|
1.7.9.5
|
|
|
|
|
|
_______________________________________________
|
|
Ocfs2-tools-devel mailing list
|
|
Ocfs2-tools-devel@oss.oracle.com
|
|
https://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel
|