Ignore:
Timestamp:
Dec 14, 2005, 12:12:15 AM (13 years ago)
Author:
bcornec
Message:

merge -r193:196 $SVN_M/branches/2.05

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/common/libmondo-files.c

    r194 r197  
    10381038    char *nfs_client_ipaddr;
    10391039    char *nfs_client_netmask;
     1040    char *nfs_client_broadcast;;
    10401041    char *nfs_client_defgw;
    10411042    char *nfs_server_ipaddr;
     
    10791080
    10801081    asprintf(&command,
     1082            "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f8 | cut -d':' -f2");
     1083    strcpy(nfs_client_broadcast,
     1084           call_program_and_get_last_line_of_output(command));
     1085    sprintf(command,
    10811086            "route -n | grep '^0.0.0.0' | awk '{printf $2}'");
    10821087    asprintf(&nfs_client_defgw,
     
    11041109    }
    11051110    fprintf(fout, "ifconfig lo 127.0.0.1  # config loopback\n");
    1106     fprintf(fout, "ifconfig %s %s netmask %s    # config client\n", nfs_dev,
    1107             nfs_client_ipaddr, nfs_client_netmask);
     1111    fprintf(fout, "ifconfig %s %s netmask %s broadcast %s   # config client\n", nfs_dev,
     1112            nfs_client_ipaddr, nfs_client_netmask, nfs_client_broadcast);
    11081113    fprintf(fout, "route add default gw %s  # default route\n", nfs_client_defgw);
    11091114    fprintf(fout, "ping -c 1 %s # ping server\n", nfs_server_ipaddr);
     
    11411146    write_one_liner_data_file(tmp, nfs_client_defgw);
    11421147    paranoid_free(nfs_client_defgw);
     1148    paranoid_free(tmp);
     1149
     1150    asprintf(&tmp, "%s/NFS-CLIENT-BROADCAST", bkpinfo->tmpdir);
     1151    write_one_liner_data_file(tmp, nfs_client_broadcast);
     1152    paranoid_free(nfs_client_broadcast);
    11431153    paranoid_free(tmp);
    11441154
Note: See TracChangeset for help on using the changeset viewer.