#######################################
# pull in a system config file, if any
-loadconfig() {
+_loadconfig() {
if [ -z "$1" ] ; then
foo="${service_config:-${service_name}}"
fi
}
+loadconfig () {
+ _loadconfig "$@"
+}
+
##############################################################
# determine on what type of system (init style) we are running
detect_init_style() {
progname="$1"
prognum="$2"
version="$3"
- rpcinfo -u localhost $prognum $version > /dev/null || {
- echo "ERROR: $progname not responding to rpc requests"
- exit 1
- }
+
+ ctdb_check_rpc_out=$(rpcinfo -u localhost $prognum $version 2>&1)
+ if [ $? -ne 0 ] ; then
+ ctdb_check_rpc_out="ERROR: $progname failed RPC check:
+$ctdb_check_rpc_out"
+ echo "$ctdb_check_rpc_out"
+ return 1
+ fi
}
######################################################