16 |
local graphic_driver |
local graphic_driver |
17 |
local monitor_info |
local monitor_info |
18 |
local monitor_resolution |
local monitor_resolution |
19 |
|
local keymap |
20 |
local hwdetected |
local hwdetected |
21 |
|
local i |
22 |
|
|
23 |
if [[ -z ${serial} ]] |
if [[ -z ${serial} ]] |
24 |
then |
then |
94 |
decho "no monitor_resolution found" |
decho "no monitor_resolution found" |
95 |
fi |
fi |
96 |
|
|
97 |
|
keymap=$(mysqldo "select keymap from cfg_input where serial=${serial};") |
98 |
|
if [[ -z ${keymap} ]] || [[ ${keymap} = NULL ]] |
99 |
|
then |
100 |
|
# set keymap to MCORE_DEFAULT_KEYMAP |
101 |
|
decho "keymap='${MCORE_DEFAULT_KEYMAP}'" |
102 |
|
import_resource cfg_input "${serial}" keymap "${MCORE_DEFAULT_KEYMAP}" |
103 |
|
fi |
104 |
|
|
105 |
|
# now setup some empty database entries if the does not exist |
106 |
|
for i in user root vnc |
107 |
|
do |
108 |
|
if [[ -z $(mysqldo "select ${i} from client_auth where serial=${serial};") ]] |
109 |
|
then |
110 |
|
decho "set empty ${i} pass" |
111 |
|
import_resource client_auth "${serial}" "${i}" "" |
112 |
|
fi |
113 |
|
done |
114 |
|
|
115 |
# update the hwdetected flags |
# update the hwdetected flags |
116 |
import_resource client_serials "${serial}" hwdetected 1 |
import_resource client_serials "${serial}" hwdetected 1 |
117 |
} |
} |