summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-10-18 13:24:03 +1100
committerAmitay Isaacs <amitay@gmail.com>2013-10-22 14:34:05 +1100
commit37aea3726941c64a5542900a2d6d75841c55803a (patch)
tree356e5622f3eb42bc59ab92f9fc83b1337dd7435c
parent0b69785eb2bd7d3f29e8ea409e5ca5437234ffaf (diff)
scripts: Make detect_init_style() more readable
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 516cdea0e73cf3f63b3303e22809834c8cbc64e4)
-rwxr-xr-xctdb/config/functions5
1 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions
index ccf23bdf04..aa31f89103 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -133,9 +133,10 @@ ctdb_check_args ()
##############################################################
# determine on what type of system (init style) we are running
-detect_init_style() {
+detect_init_style()
+{
# only do detection if not already set:
- test "x$CTDB_INIT_STYLE" != "x" && return
+ [ -z "$CTDB_INIT_STYLE" ] || return
if [ -x /sbin/startproc ]; then
CTDB_INIT_STYLE="suse"