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 auth |
22 |
|
local i |
23 |
|
|
24 |
if [[ -z ${serial} ]] |
if [[ -z ${serial} ]] |
25 |
then |
then |
95 |
decho "no monitor_resolution found" |
decho "no monitor_resolution found" |
96 |
fi |
fi |
97 |
|
|
98 |
|
keymap=$(mysqldo "select keymap from cfg_input where serial=${serial};") |
99 |
|
if [[ -z ${keymap} ]] || [[ ${keymap} = NULL ]] |
100 |
|
then |
101 |
|
# set keymap to MCORE_DEFAULT_KEYMAP |
102 |
|
decho "keymap='${MCORE_DEFAULT_KEYMAP}'" |
103 |
|
import_resource cfg_input "${serial}" keymap "${MCORE_DEFAULT_KEYMAP}" |
104 |
|
fi |
105 |
|
|
106 |
|
# now setup some empty database entries if the does not exist |
107 |
|
for i in user root vnc |
108 |
|
do |
109 |
|
auth=$(mysqldo "select ${i} from client_auth where serial=${serial};") |
110 |
|
if [[ -z ${auth} ]] || [[ ${auth} = NULL ]] |
111 |
|
then |
112 |
|
decho "set empty ${i} pass" |
113 |
|
import_resource client_auth "${serial}" "${i}" "" |
114 |
|
fi |
115 |
|
done |
116 |
|
|
117 |
|
# create an empty screensaver entry |
118 |
|
decho "set empty screensaver" |
119 |
|
import_resource cfg_screensaver "${serial}" "screensaver" "" |
120 |
|
|
121 |
# update the hwdetected flags |
# update the hwdetected flags |
122 |
import_resource client_serials "${serial}" hwdetected 1 |
import_resource client_serials "${serial}" hwdetected 1 |
123 |
} |
} |