1 |
# $Id$ |
# $Id$ |
2 |
|
|
3 |
push_config graphic_resolution |
push_firstboot 10_graphic_driver |
4 |
|
push_firstboot 10_graphic_resolution |
5 |
|
|
6 |
|
push_config 10_graphic_driver |
7 |
|
push_config 10_graphic_resolution |
8 |
|
push_config 10_graphic_depth |
9 |
|
#push_config 10_graphic_refresh |
10 |
|
|
11 |
help_graphic_resolution() |
help_graphic_resolution() |
12 |
{ |
{ |
32 |
control_client "${serial}" help graphic.driver |
control_client "${serial}" help graphic.driver |
33 |
} |
} |
34 |
|
|
35 |
# set_graphic_gfxcard $serial $value |
# set_graphic_driver $serial $value |
36 |
set_graphic_gfxcard() |
set_graphic_driver() |
37 |
{ |
{ |
38 |
local serial="${CLASS_ARGV[0]}" |
local serial="${CLASS_ARGV[0]}" |
39 |
local value="${CLASS_ARGV[1]}" |
local value="${CLASS_ARGV[1]}" |
41 |
import_resource cfg_graphic "${serial}" module "${value}" |
import_resource cfg_graphic "${serial}" module "${value}" |
42 |
} |
} |
43 |
|
|
44 |
|
control_graphic_driver() |
45 |
|
{ |
46 |
|
local serial="${CLASS_ARGV[0]}" |
47 |
|
push_config_10_graphic_driver "${serial}" |
48 |
|
} |
49 |
|
|
50 |
|
push_config_10_graphic_driver() |
51 |
|
{ |
52 |
|
local serial="$1" |
53 |
|
local value |
54 |
|
|
55 |
|
value=$(mysqldo "select module from cfg_graphic where serial='${serial}'") |
56 |
|
control_client "${serial}" set graphic.driver "${value}" |
57 |
|
} |
58 |
|
|
59 |
# set_graphic_resolution $serial $value |
# set_graphic_resolution $serial $value |
60 |
set_graphic_resolution() |
set_graphic_resolution() |
61 |
{ |
{ |
69 |
control_graphic_resolution() |
control_graphic_resolution() |
70 |
{ |
{ |
71 |
local serial="${CLASS_ARGV[0]}" |
local serial="${CLASS_ARGV[0]}" |
72 |
push_config_graphic_resolution "${serial}" |
push_config_10_graphic_resolution "${serial}" |
73 |
} |
} |
74 |
|
|
75 |
push_config_graphic_resolution() |
push_config_10_graphic_resolution() |
76 |
{ |
{ |
77 |
local serial="$1" |
local serial="$1" |
78 |
local value |
local value |
90 |
import_resource cfg_graphic "${serial}" depth "${value}" |
import_resource cfg_graphic "${serial}" depth "${value}" |
91 |
} |
} |
92 |
|
|
93 |
|
control_graphic_depth() |
94 |
|
{ |
95 |
|
local serial="${CLASS_ARGV[0]}" |
96 |
|
push_config_10_graphic_depth "${serial}" |
97 |
|
} |
98 |
|
|
99 |
|
push_config_10_graphic_depth() |
100 |
|
{ |
101 |
|
local serial="$1" |
102 |
|
local value |
103 |
|
|
104 |
|
value=$(mysqldo "select depth from cfg_graphic where serial='${serial}'") |
105 |
|
control_client "${serial}" set graphic.depth "${value}" |
106 |
|
} |
107 |
|
|
108 |
# set_graphic_refesh $serial $value |
# set_graphic_refesh $serial $value |
109 |
set_graphic_refresh() |
set_graphic_refresh() |
110 |
{ |
{ |
118 |
control_graphic_refresh() |
control_graphic_refresh() |
119 |
{ |
{ |
120 |
local serial="${CLASS_ARGV[0]}" |
local serial="${CLASS_ARGV[0]}" |
121 |
|
push_config_10_graphic_refresh "${serial}" |
122 |
|
} |
123 |
|
|
124 |
|
push_config_10_graphic_refresh() |
125 |
|
{ |
126 |
|
local serial="$1" |
127 |
local value |
local value |
128 |
|
|
129 |
value=$(mysqldo "select hz from cfg_graphic where serial='${serial}'") |
value=$(mysqldo "select hz from cfg_graphic where serial='${serial}'") |
130 |
control_client "${serial}" set graphic.resolution "${value}" |
control_client "${serial}" set graphic.resolution "${value}" |
131 |
} |
} |
132 |
|
|
133 |
|
push_firstboot_10_graphic_driver() |
134 |
|
{ |
135 |
|
local serial="$1" |
136 |
|
local graphic_driver |
137 |
|
|
138 |
|
nsslsay_queue_init |
139 |
|
nsslsay_queue_add "nocolors" |
140 |
|
nsslsay_queue_add "get hardware.detect driver graphic" |
141 |
|
graphic_driver=$(control_client "${serial}" run-queue) |
142 |
|
if [[ -n ${graphic_driver} ]] |
143 |
|
then |
144 |
|
decho "graphic_driver='${graphic_driver}'" |
145 |
|
import_resource cfg_graphic "${serial}" module "${graphic_driver}" |
146 |
|
else |
147 |
|
decho "no graphic_driver found" |
148 |
|
fi |
149 |
|
} |
150 |
|
|
151 |
|
push_firstboot_10_graphic_resolution() |
152 |
|
{ |
153 |
|
local serial="$1" |
154 |
|
local monitor_info |
155 |
|
local monitor_resolution |
156 |
|
|
157 |
|
nsslsay_queue_init |
158 |
|
nsslsay_queue_add "nocolors" |
159 |
|
nsslsay_queue_add "get hardware.detect info monitor" |
160 |
|
monitor_info=$(control_client "${serial}" run-queue) |
161 |
|
monitor_resolution="${monitor_info##*;}" |
162 |
|
if [[ -n ${monitor_resolution} ]] |
163 |
|
then |
164 |
|
decho "monitor_resolution='${monitor_resolution}'" |
165 |
|
import_resource cfg_graphic "${serial}" resolution "${monitor_resolution}" |
166 |
|
else |
167 |
|
decho "no monitor_resolution found" |
168 |
|
fi |
169 |
|
} |