V1.5
git-svn-id: http://172.17.0.253/svn/soft_pkgs/sys_nicmonitor@497 09c3743a-b0dd-45d3-b506-aa74c7a2a6ef
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#define IPLEN 16
|
||||
#define CONF_FILE "/conf/nic/sys_netcard_conf.txt"
|
||||
|
||||
#define MNIC_VERSION "1.4"
|
||||
#define MNIC_VERSION "1.5"
|
||||
|
||||
#define NIC_UNKNOWN 0
|
||||
#define NIC_DOWN 1
|
||||
@@ -1297,6 +1297,8 @@ int main(int argc, char ** argv)
|
||||
struct sigaction sig;
|
||||
struct passwd *user;
|
||||
// proc_invocation prcm;
|
||||
|
||||
char log_record[125]={0};
|
||||
|
||||
memset(&conf, 0, sizeof(CONFIG_FILE_ST));
|
||||
if(isrun(argv[0]) == 1){
|
||||
@@ -1327,11 +1329,12 @@ int main(int argc, char ** argv)
|
||||
sprintf(sem_path,"%s",user->pw_dir);
|
||||
sprintf(conf_path,"%s",user->pw_dir);
|
||||
}
|
||||
|
||||
strcat(log_path,LOG_PATH);
|
||||
strcat(shm_path,SHM_PATH);
|
||||
strcat(sem_path,SEM_PATH);
|
||||
strcat(conf_path,CONF_FILE);
|
||||
|
||||
|
||||
create_semdir();
|
||||
create_shmdir();
|
||||
create_logdir();
|
||||
@@ -1372,6 +1375,31 @@ int main(int argc, char ** argv)
|
||||
|
||||
get_conf();
|
||||
|
||||
if(shm_path){
|
||||
printf("shm_path:%s\n",shm_path);
|
||||
sprintf(log_record,"shm_path:%s\n",shm_path);
|
||||
record_log(log_record);
|
||||
}
|
||||
|
||||
if(log_path){
|
||||
printf("log_path:%s\n",log_path);
|
||||
sprintf(log_record,"log_path:%s\n",log_path);
|
||||
record_log(log_record);
|
||||
}
|
||||
|
||||
|
||||
if(conf.udp){
|
||||
printf("udp %s\n",conf.udp);
|
||||
sprintf(log_record,"udp %s\n",conf.udp);
|
||||
record_log(log_record);
|
||||
}
|
||||
|
||||
for(i=0;conf.nic[i].dev_name[0]!=0;i++){
|
||||
printf("nic %s\n",conf.nic[i].dev_name);
|
||||
sprintf(log_record,"nic %s\n",conf.nic[i].dev_name);
|
||||
record_log(log_record);
|
||||
}
|
||||
|
||||
/* get broadcast address*/
|
||||
if((ret = get_broad_ip()) != 0)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user