scripts: Make detect_init_style() more readable
authorMartin Schwenke <martin@meltin.net>
Fri, 18 Oct 2013 02:24:03 +0000 (13:24 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 22 Oct 2013 03:34:05 +0000 (14:34 +1100)
Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions

index ccf23bdf042316290490c0f62fa6da5275058588..aa31f891030ff5a838670b81b27a053a36641038 100755 (executable)
@@ -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"