diff options
author | Martin Schwenke <martin@meltin.net> | 2016-07-06 20:40:23 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2016-07-21 02:24:26 +0200 |
commit | b0c1dbfb8f2bd2743b21a6a77343b2a7940958ce (patch) | |
tree | 0fd88965192d714cc1df310b343ae1530cf2a09c | |
parent | 987fd078d267a72ccddd6db2f197b8b30f52041e (diff) | |
download | samba-b0c1dbfb8f2bd2743b21a6a77343b2a7940958ce.tar.gz |
ctdb-scripts: Avoid shellcheck warning SC2015 (A && B || C)
SC2015: Note that A && B || C is not if-then-else. C may run when A is
true.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-x | ctdb/config/ctdb.init | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index 83c1493c130..f7ba95ced69 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -95,6 +95,9 @@ stop() redhat) "$ctdbd_wrapper" "$pidfile" "stop" RETVAL=$? + # Common idiom in Red Hat init scripts - success() always + # succeeds so this does behave like if-then-else + # shellcheck disable=SC2015 [ $RETVAL -eq 0 ] && success || failure echo "" [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ctdb |