From: Junxiao Bi To: 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 --- 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