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

Usage of parted2fdisk instead of fdisk everywhere.
on ia64 this is mandatory, and simplifies the infrastructure
on other archs, it doesn't change anything as parted2fdisk here is a link to fdisk

File:
1 edited

Legend:

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

    r192 r196  
    11891189    char nfs_client_ipaddr[MAX_STR_LEN];
    11901190    char nfs_client_netmask[MAX_STR_LEN];
     1191    char nfs_client_broadcast[MAX_STR_LEN];
    11911192    char nfs_client_defgw[MAX_STR_LEN];
    11921193    char nfs_server_ipaddr[MAX_STR_LEN];
     
    12221223           call_program_and_get_last_line_of_output(command));
    12231224    sprintf(command,
     1225            "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f8 | cut -d':' -f2");
     1226    strcpy(nfs_client_broadcast,
     1227           call_program_and_get_last_line_of_output(command));
     1228    sprintf(command,
    12241229            "route -n | grep '^0.0.0.0' | awk '{printf $2}'");
    12251230    strcpy(nfs_client_defgw,
     
    12391244    }
    12401245    fprintf(fout, "ifconfig lo 127.0.0.1  # config loopback\n");
    1241     fprintf(fout, "ifconfig %s %s netmask %s    # config client\n", nfs_dev,
    1242             nfs_client_ipaddr, nfs_client_netmask);
     1246    fprintf(fout, "ifconfig %s %s netmask %s broadcast %s   # config client\n", nfs_dev,
     1247            nfs_client_ipaddr, nfs_client_netmask, nfs_client_broadcast);
    12431248    fprintf(fout, "route add default gw %s  # default route\n", nfs_client_defgw);
    12441249    fprintf(fout, "ping -c 1 %s # ping server\n", nfs_server_ipaddr);
     
    12621267    sprintf(tmp, "%s/NFS-CLIENT-NETMASK", bkpinfo->tmpdir);
    12631268    write_one_liner_data_file(tmp, nfs_client_netmask);
     1269    sprintf(tmp, "%s/NFS-CLIENT-BROADCAST", bkpinfo->tmpdir);
     1270    write_one_liner_data_file(tmp, nfs_client_broadcast);
    12641271    sprintf(tmp, "%s/NFS-CLIENT-DEFGW", bkpinfo->tmpdir);
    12651272    write_one_liner_data_file(tmp, nfs_client_defgw);
Note: See TracChangeset for help on using the changeset viewer.