1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-scripts: Clean up function detect_init_style()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2018-02-19 15:29:43 +11:00 committed by Amitay Isaacs
parent 6c5f7c0003
commit 1c9b6c3992

View File

@ -171,16 +171,18 @@ ctdb_check_args ()
# determine on what type of system (init style) we are running
detect_init_style()
{
# only do detection if not already set:
[ -z "$CTDB_INIT_STYLE" ] || return
# only do detection if not already set:
if [ -n "$CTDB_INIT_STYLE" ] ; then
return
fi
if [ -x /sbin/startproc ]; then
CTDB_INIT_STYLE="suse"
elif [ -x /sbin/start-stop-daemon ]; then
CTDB_INIT_STYLE="debian"
else
CTDB_INIT_STYLE="redhat"
fi
if [ -x /sbin/startproc ]; then
CTDB_INIT_STYLE="suse"
elif [ -x /sbin/start-stop-daemon ]; then
CTDB_INIT_STYLE="debian"
else
CTDB_INIT_STYLE="redhat"
fi
}
######################################################