# $Id$ push_firstboot 10_graphic_driver push_firstboot 10_graphic_resolution push_firstboot 10_graphic_depth push_config 10_graphic_driver push_config 10_graphic_resolution push_config 10_graphic_depth #push_config 10_graphic_refresh push_config 10_graphic_hdmi help_graphic_resolution() { local serial="${CLASS_ARGV[0]}" control_client "${serial}" help graphic.resolution } help_graphic_refresh() { local serial="${CLASS_ARGV[0]}" control_client "${serial}" help graphic.refresh } help_graphic_depth() { local serial="${CLASS_ARGV[0]}" control_client "${serial}" help graphic.depth } help_graphic_driver() { local serial="${CLASS_ARGV[0]}" control_client "${serial}" help graphic.driver } help_graphic_hdmi() { local serial="${CLASS_ARGV[0]}" control_client "${serial}" help graphic.hdmi } # set_graphic_driver $serial $value set_graphic_driver() { local serial="${CLASS_ARGV[0]}" local value="${CLASS_ARGV[1]}" import_resource cfg_graphic "${serial}" module "${value}" } control_graphic_driver() { local serial="${CLASS_ARGV[0]}" push_config_10_graphic_driver "${serial}" } push_config_10_graphic_driver() { local serial="$1" local value value=$(mysqldo "select module from cfg_graphic where serial='${serial}'") control_client "${serial}" set graphic.driver "\"${value}\"" } # set_graphic_resolution $serial $value set_graphic_resolution() { local serial="${CLASS_ARGV[0]}" local value="${CLASS_ARGV[1]}" import_resource cfg_graphic "${serial}" resolution "${value}" } # control_graphic_resolution $serial control_graphic_resolution() { local serial="${CLASS_ARGV[0]}" push_config_10_graphic_resolution "${serial}" } push_config_10_graphic_resolution() { local serial="$1" local value value=$(mysqldo "select resolution from cfg_graphic where serial='${serial}'") control_client "${serial}" set graphic.resolution "\"${value}\"" } # set_graphic_depth $serial $value set_graphic_depth() { local serial="${CLASS_ARGV[0]}" local value="${CLASS_ARGV[1]}" import_resource cfg_graphic "${serial}" depth "${value}" } control_graphic_depth() { local serial="${CLASS_ARGV[0]}" push_config_10_graphic_depth "${serial}" } push_config_10_graphic_depth() { local serial="$1" local value value=$(mysqldo "select depth from cfg_graphic where serial='${serial}'") control_client "${serial}" set graphic.depth "\"${value}\"" } # set_graphic_refesh $serial $value set_graphic_refresh() { local serial="${CLASS_ARGV[0]}" local value="${CLASS_ARGV[1]}" import_resource cfg_graphic "${serial}" refresh_rate "${value}" } # control_graphic_resolution $serial control_graphic_refresh() { local serial="${CLASS_ARGV[0]}" push_config_10_graphic_refresh "${serial}" } push_config_10_graphic_refresh() { local serial="$1" local value value=$(mysqldo "select refresh_rate from cfg_graphic where serial='${serial}'") control_client "${serial}" set graphic.refresh "\"${value}\"" } # set_graphic_hdmi $serial $value set_graphic_hdmi() { local serial="${CLASS_ARGV[0]}" local value="${CLASS_ARGV[1]}" import_resource cfg_graphic "${serial}" hdmi "${value}" } # control_graphic_hdmi $serial control_graphic_hdmi() { local serial="${CLASS_ARGV[0]}" push_config_10_graphic_hdmi "${serial}" } push_config_10_graphic_hdmi() { local serial="$1" local value value=$(mysqldo "select hdmi from cfg_graphic where serial='${serial}'") control_client "${serial}" set graphic.hdmi "\"${value}\"" } push_firstboot_10_graphic_driver() { local serial="$1" local graphic_driver if [[ ${MCORE_GRAPHIC_HWDETECT_DEEP} = 1 ]] then nsslsay_queue_init nsslsay_queue_add "nocolors" nsslsay_queue_add "get hardware.detect driver graphic" graphic_driver=$(control_client "${serial}" run-queue) if [[ -n ${graphic_driver} ]] then decho "graphic_driver='${graphic_driver}'" import_resource cfg_graphic "${serial}" module "${graphic_driver}" else decho "no graphic_driver found" fi else # default to runtime autodetection graphic_driver="auto" import_resource cfg_graphic "${serial}" module "${graphic_driver}" fi } push_firstboot_10_graphic_resolution() { local serial="$1" local monitor_info local monitor_resolution if [[ ${MCORE_GRAPHIC_HWDETECT_DEEP} = 1 ]] then nsslsay_queue_init nsslsay_queue_add "nocolors" nsslsay_queue_add "get hardware.detect info monitor" monitor_info=$(control_client "${serial}" run-queue) monitor_resolution="${monitor_info##*;}" if [[ -n ${monitor_resolution} ]] then decho "monitor_resolution='${monitor_resolution}'" import_resource cfg_graphic "${serial}" resolution "${monitor_resolution}" else decho "no monitor_resolution found" fi else monitor_resolution="auto" import_resource cfg_graphic "${serial}" resolution "${monitor_resolution}" fi } push_firstboot_10_graphic_depth() { local serial="$1" # just set to 'auto' local graphic_depth="auto" if [[ ${MCORE_GRAPHIC_HWDETECT_DEEP} = 1 ]] then # just set it to 'auto' decho "graphic_depth='${graphic_depth}'" import_resource cfg_graphic "${serial}" depth "${graphic_depth}" else # default to runtime autodetection graphic_driver="auto" import_resource cfg_graphic "${serial}" depth "${graphic_depth}" fi }