# $Id$ push_config 10_network_hostname help_network_hostname() { local serial="${CLASS_ARGV[0]}" control_client "${serial}" help network.hostname mecho "get network.hostname" mecho " Displays the current hostname" mecho mecho "set network.hostname [hostname]" mecho " Sets the hostname of the system" mecho " mcore - the local hostname" } set_network_hostname() { local serial="${CLASS_ARGV[0]}" local value="${CLASS_ARGV[1]}" import_resource cfg_network "${serial}" hostname "${value}" } control_network_hostname() { local serial="${CLASS_ARGV[0]}" push_config_10_network_hostname "${serial}" } push_config_10_network_hostanme() { local serial="$1" local value value=$(mysqldo "select hostname from cfg_network where serial='${serial}'") if [[ -z ${value} ]] || [[ ${value} = NULL ]] then decho "retval NULL, not running 'control_client '${serial}' set network.hostname '${value}''" else control_client "${serial}" set network.hostname "${value}" fi }