--- mcore-src/trunk/mcore-tools/daemon/include/daemon.global.class 2011/02/02 21:17:12 1251 +++ mcore-src/trunk/mcore-tools/daemon/include/daemon.global.class 2011/02/02 21:17:54 1252 @@ -1,21 +1,21 @@ # $Id$ -# import_resource $table $serial $resource $value -import_resource() -{ - local table="$1" - local serial="$2" - local resource="$3" - local value="$4" - - if [[ ${DEBUG} = 1 ]] - then - echo "${table}->${resource}=${value}" >> /root/lala.log - echo "mysqldo \"update ${table} set ${resource}='${value}' where serial=${serial};\"" >> /root/lala.log - fi - - mysql_insert "${table}",serial="${serial}","${resource}"="${value}" -} +# # import_resource $table $serial $resource $value +# import_resource() +# { +# local table="$1" +# local serial="$2" +# local resource="$3" +# local value="$4" +# +# if [[ ${DEBUG} = 1 ]] +# then +# echo "${table}->${resource}=${value}" >> /root/lala.log +# echo "mysqldo \"update ${table} set ${resource}='${value}' where serial=${serial};\"" >> /root/lala.log +# fi +# +# mysql_insert "${table}",serial="${serial}","${resource}"="${value}" +# } # run_class $method $caller $argv1 $argv2 ... $argvN run_class() @@ -106,6 +106,10 @@ return 1 fi + if [[ ! -d $(dirname ${CONFIG}) ]] + then + install -d $(dirname ${CONFIG}) + fi : > ${CONFIG} }