[Ocfs2-tools-devel] [PATCH 06/14] o2cb: don't write sysconfig if status not changed
Joseph Qi
joseph.qi at huawei.com
Tue Apr 12 19:57:01 PDT 2016
On 2016/4/1 11:10, Junxiao Bi wrote:
> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
Reviewed-by: Joseph Qi <joseph.qi at huawei.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 9e0b31cf7219..e2f80f797680 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
> ;;
>
>
More information about the Ocfs2-tools-devel
mailing list