8 |
#source ${MCLIBDIR}/include/mysqlfunctions.global.class |
#source ${MCLIBDIR}/include/mysqlfunctions.global.class |
9 |
source ${MCLIBDIR}/include/hwdetection.global.class |
source ${MCLIBDIR}/include/hwdetection.global.class |
10 |
|
|
11 |
# client specific |
# load client classes plugins |
12 |
for i in ${MCLIBDIR}/include/*.client.class |
load_client_classes |
|
do |
|
|
source ${i} || echo "error loading ${i}" |
|
|
done |
|
13 |
|
|
14 |
# config settings |
# config settings |
15 |
source /etc/mcore/config.rc |
source /etc/mcore/config.rc |
16 |
source /etc/mcore/serial |
#source /etc/mcore/serial |
17 |
|
|
18 |
# import_hardware_resource() |
# import_hardware_resource() |
19 |
# { |
# { |
45 |
# } |
# } |
46 |
|
|
47 |
DEBUG=1 |
DEBUG=1 |
48 |
|
NOCOLORS="false" |
49 |
|
WEBCRLF="false" |
50 |
|
QUIET="false" |
51 |
|
|
52 |
run=run |
run=run |
53 |
valid_session=no |
valid_session=no |
64 |
get*) run_class ${line} ;; |
get*) run_class ${line} ;; |
65 |
set*) run_class ${line} ;; |
set*) run_class ${line} ;; |
66 |
auth*) validate_auth ${line/auth /} ;; |
auth*) validate_auth ${line/auth /} ;; |
67 |
provide) print_provide ;; |
provide) valid_session && print_provide ;; |
68 |
|
require) valid_session && verify_requirements ;; |
69 |
|
reload) valid_session && mecho "reloading client classes ..." && load_client_classes ;; |
70 |
|
restart) valid_session && restart_service ;; |
71 |
|
stop) valid_session && stop_service ;; |
72 |
|
nocolors) export NOCOLORS="true" ;; |
73 |
|
colors) export NOCOLORS="false" ;; |
74 |
|
webcrlf) export WEBCRLF="true" ;; |
75 |
|
quiet) export QUIET="true" ;; |
76 |
help*) |
help*) |
77 |
if validate_session |
if valid_session |
78 |
then |
then |
79 |
if [[ ${line} = help ]] |
if [[ ${line} = help ]] |
80 |
then |
then |
91 |
*) |
*) |
92 |
mecho "Unkown command '${line}'" |
mecho "Unkown command '${line}'" |
93 |
mecho "Type 'help' for more information." |
mecho "Type 'help' for more information." |
94 |
echo "$line" >> /root/lala.log |
#echo "$line" >> /root/lala.log |
95 |
;; |
;; |
96 |
esac |
esac |
97 |
done |
done |