else
is_all=1
fi
- # Return for for netconf when not available.
+
if [ "${server}" = "netconf" ]; then
- if ! ${have_netconf}; then
- return
- fi
# reload is not supported for netconf.
if [ "${command}" = "reload" ]; then
if [ "${is_all}" -eq 1 ]; then
dhcp6=$( printf "%s" "${dhcp6}" | tr '[:upper:]' '[:lower:]' )
dhcp_ddns=$( printf "%s" "${dhcp_ddns}" | tr '[:upper:]' '[:lower:]' )
ctrl_agent=$( printf "%s" "${ctrl_agent}" | tr '[:upper:]' '[:lower:]' )
-netconf=$( printf "%s" "${netconf}" | tr '[:upper:]' '[:lower:]' )
+if ${have_netconf}; then
+ netconf=$( printf "%s" "${netconf}" | tr '[:upper:]' '[:lower:]' )
+fi
case ${command} in
# Start the servers.
${args}" 1
run_conditional "ctrl_agent" "start_server ${ctrl_agent_srv} -c ${kea_ctrl_agent_config_file} \
${args}" 1
- run_conditional "netconf" "start_server ${netconf_srv} -c ${kea_netconf_config_file} \
+ if ${have_netconf}; then
+ run_conditional "netconf" "start_server ${netconf_srv} -c ${kea_netconf_config_file} \
${args}" 1
+ fi
exit 0 ;;
run_conditional "dhcp6" "stop_server ${dhcp6_srv}" 0
run_conditional "dhcp_ddns" "stop_server ${dhcp_ddns_srv}" 0
run_conditional "ctrl_agent" "stop_server ${ctrl_agent_srv}" 0
- run_conditional "netconf" "stop_server ${netconf_srv}" 0
+ if ${have_netconf}; then
+ run_conditional "netconf" "stop_server ${netconf_srv}" 0
+ fi
exit 0 ;;
run_conditional "dhcp6" "reload_server ${dhcp6_srv}" 0
run_conditional "dhcp_ddns" "reload_server ${dhcp_ddns_srv}" 0
run_conditional "ctrl_agent" "reload_server ${ctrl_agent_srv}" 0
- run_conditional "netconf" "reload_server ${netconf_srv}" 0
+ if ${have_netconf}; then
+ run_conditional "netconf" "reload_server ${netconf_srv}" 0
+ fi
exit 0 ;;
run_conditional "dhcp6" "print_version kea-dhcp6 ${dhcp6_srv}" 0
run_conditional "dhcp_ddns" "print_version kea-dhcp-ddns ${dhcp_ddns_srv}" 0
run_conditional "ctrl_agent" "print_version kea-ctrl-agent ${ctrl_agent_srv}" 0
- run_conditional "netconf" "print_version kea-netconf ${netconf_srv}" 0
+ if ${have_netconf}; then
+ run_conditional "netconf" "print_version kea-netconf ${netconf_srv}" 0
+ fi
exit 0 ;;