--- mcore-src/trunk/mcore-tools/src/include/daemon.global.class.in 2014/07/14 12:19:30 2344 +++ mcore-src/trunk/mcore-tools/src/include/daemon.global.class.in 2016/02/02 14:08:20 2754 @@ -96,6 +96,52 @@ fi } +run_push_config() +{ + local serial="$1" + local config + + if [[ -z ${serial} ]] + then + eecho "missing serial" + return 1 + fi + + for config in $(NOCOLORS=1 print_push_config) + do + if [[ -n $(typeset -f push_config_${config}) ]] + then + decho "running: 'push_config_${config} ${serial}'" + push_config_"${config}" "${serial}" + else + decho "no function 'push_config_${config}' for '${config}' found." + fi + done +} + +run_push_firstboot() +{ + local serial="$1" + local config + + if [[ -z ${serial} ]] + then + eecho "missing serial" + return 1 + fi + + for config in $(NOCOLORS=1 print_push_firstboot) + do + if [[ -n $(typeset -f push_firstboot_${config}) ]] + then + decho "running: 'push_firstboot_${config} ${serial}'" + push_firstboot_"${config}" "${serial}" + else + decho "no function 'push_firstboot_${config}' for '${config}' found." + fi + done +} + help_topics() { local i @@ -107,6 +153,7 @@ mecho "\tget - shows current value for a settings" mecho "\tset - sets value for a setting" mecho "\tauth - authenticate to the daemon" + mecho "\tcertauth - authenticate to the daemon via fingerprint" mecho "\tprovide - shows provides of a system" mecho "\trequire - verify plugin requirements" mecho "\treload - reloads all client classes plugins" @@ -241,6 +288,60 @@ return "${retval}" } +push_config() +{ + local push_configs="$@" + local i + + for i in ${push_configs} + do + # check for duplicate provides + if no_duplicate "${PUSH_CONFIG}" "${i}" + then + export PUSH_CONFIG="${PUSH_CONFIG} ${i}" + else + decho "duplicate push_config '${i}' detected!" + fi + done +} + +print_push_config() +{ + local sorted + + # sort them alpabetically + sorted=$(for i in ${PUSH_CONFIG}; do echo "${i}"; done | sort) + # do not escape, or CRLFS get printed to screen too + rvecho ${sorted} +} + +push_firstboot() +{ + local push_firstboots="$@" + local i + + for i in ${push_firstboots} + do + # check for duplicate provides + if no_duplicate "${PUSH_FIRSTBOOT}" "${i}" + then + export PUSH_FIRSTBOOT="${PUSH_FIRSTBOOT} ${i}" + else + decho "duplicate push_firstboot '${i}' detected!" + fi + done +} + +print_push_firstboot() +{ + local sorted + + # sort them alpabetically + sorted=$(for i in ${PUSH_FIRSTBOOT}; do echo "${i}"; done | sort) + # do not escape, or CRLFS get printed to screen too + rvecho ${sorted} +} + help_daemon_mroot() { mecho "get daemon.mroot"