# $Id$ provide basic-version help_helpdesk_unit() { mecho "get helpdesk.unit" mecho " Prints the current helpdesk unit name." mecho mecho "set helpdesk.unit [unit]" mecho " Sets the current helpdesk unit name." } help_helpdesk_phone() { mecho "get helpdesk.phone" mecho " Prints the current helpdesk phone number." mecho mecho "set helpdesk.phone [phone]" mecho " Sets the current helpdesk phone number." } get_helpdesk_unit() { local unit if [ -f ${MCORE_CONFIG_PATH}/helpdesk/unit ] then unit="$(source ${MCORE_CONFIG_PATH}/helpdesk/unit; echo ${HELPDESK_UNIT})" fi if [[ -z ${unit} ]] then unit="UNKNOWN" fi rvecho "${unit}" } get_helpdesk_phone() { local phone if [ -f ${MCORE_CONFIG_PATH}/helpdesk/phone ] then unit="$(source ${MCORE_CONFIG_PATH}/helpdesk/phone; echo ${HELPDESK_PHONE})" fi if [[ -z ${phone} ]] then phone="UNKNOWN" fi rvecho "${phone}" } set_helpdesk_unit() { local unit="${CLASS_ARGV[0]}" [[ -z ${unit} ]] && help_helpdesk_unit && return 1 [[ -d ${MCORE_CONFIG_PATH}/helpdesk ]] || install -d ${MCORE_CONFIG_PATH}/helpdesk CONFIG="${MCORE_CONFIG_PATH}/helpdesk/unit" clearconfig addconfig "HELPDESK_UNIT=\"${unit}\"" } set_helpdesk_phone() { local phone="${CLASS_ARGV[0]}" [[ -z ${phone} ]] && help_helpdesk_phone && return 1 [[ -d ${MCORE_CONFIG_PATH}/helpdesk ]] || install -d ${MCORE_CONFIG_PATH}/helpdesk CONFIG="${MCORE_CONFIG_PATH}/helpdesk/phone" clearconfig addconfig "HELPDESK_PHONE=\"${phone}\"" }