--- mcore-src/trunk/mcore-tools/src/modules/tigervnc/vnc.control.class.in 2016/02/02 14:08:20 2754 +++ mcore-src/trunk/mcore-tools/src/modules/tigervnc/vnc.control.class.in 2016/02/02 14:11:44 2755 @@ -1,5 +1,8 @@ # $Id$ +push_firstboot 10_vnc_passwd +push_firstboot 80_vnc_service + push_config 80_vnc_service 80_vnc_passwd help_vnc_service() @@ -89,3 +92,25 @@ control_client "${serial}" set vnc.passwd "${value}" fi } + +push_firstboot_80_vnc_service() +{ + local serial="$1" + + # enable vnc service + decho "enable vnc service" + import_resource cfg_vnc "${serial}" "service" "1" +} + +push_firstboot_10_vnc_passwd() +{ + local serial="$1" + + # now setup some empty database entries if the does not exist + auth=$(mysqldo "select vnc from client_auth where serial=${serial};") + if [[ -z ${auth} ]] || [[ ${auth} = NULL ]] + then + decho "set empty vnc pass" + import_resource client_auth "${serial}" "vnc" "" + fi +}