--- mcore-src/trunk/mcore-tools/daemon/include/daemon.global.class 2014/01/10 12:02:07 2140 +++ mcore-src/trunk/mcore-tools/src/include/daemon.global.class.in 2014/01/20 14:02:27 2302 @@ -8,7 +8,7 @@ # client specific for i in $(find ${MCORE_LIBDIR}/include -type f -name \*.client.class) do - source ${i} || eecho "error loading ${i}" + include ${i} || eecho "error loading ${i}" done } @@ -28,9 +28,7 @@ local pid for pid in $(pidof sslsvd) do - kill -15 ${pid} - sleep 1 - kill -9 ${pid} + kill -SIGTERM ${pid} done } @@ -54,31 +52,38 @@ # run_class $method $caller $argv1 $argv2 ... $argvN run_class() { - local method="$1" - local caller="$2" + local method="${GLOBAL_ARGV[0]}" + local caller="${GLOBAL_ARGV[1]}" local class local cmd - local argv + local i + local count if valid_session then class="${caller%.*}" cmd="${caller#*.}" - argv="${@/${caller}/}" # remove caller - argv="${argv/${method}/}" # remove method -# echo "method=${method}" -# echo "caller=${caller}" -# echo "class=${class}" -# echo "cmd=${cmd}" -# echo "argv=${argv}" + # copy GLOBAL_ARGV to CLASS_ARGV array without method and caller.class + unset CLASS_ARGV + count="${#GLOBAL_ARGV[*]}" + for (( i=2; i