Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/daemon/include/daemon.global.class

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1251 by niro, Wed Feb 2 20:20:24 2011 UTC revision 1252 by niro, Wed Feb 2 21:17:54 2011 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3  # import_resource $table $serial $resource $value  # # import_resource $table $serial $resource $value
4  import_resource()  # import_resource()
5  {  # {
6   local table="$1"  # local table="$1"
7   local serial="$2"  # local serial="$2"
8   local resource="$3"  # local resource="$3"
9   local value="$4"  # local value="$4"
10    #
11   if [[ ${DEBUG} = 1 ]]  # if [[ ${DEBUG} = 1 ]]
12   then  # then
13   echo "${table}->${resource}=${value}" >> /root/lala.log  # echo "${table}->${resource}=${value}" >> /root/lala.log
14   echo "mysqldo \"update ${table} set ${resource}='${value}' where serial=${serial};\"" >> /root/lala.log  # echo "mysqldo \"update ${table} set ${resource}='${value}' where serial=${serial};\"" >> /root/lala.log
15   fi  # fi
16    #
17   mysql_insert "${table}",serial="${serial}","${resource}"="${value}"  # mysql_insert "${table}",serial="${serial}","${resource}"="${value}"
18  }  # }
19    
20  # run_class $method $caller $argv1 $argv2 ... $argvN  # run_class $method $caller $argv1 $argv2 ... $argvN
21  run_class()  run_class()
# Line 106  clearconfig() Line 106  clearconfig()
106   return 1   return 1
107   fi   fi
108    
109     if [[ ! -d $(dirname ${CONFIG}) ]]
110     then
111     install -d $(dirname ${CONFIG})
112     fi
113   : > ${CONFIG}   : > ${CONFIG}
114  }  }
115    

Legend:
Removed from v.1251  
changed lines
  Added in v.1252