Changeset 672 in MondoRescue for trunk/mondo/mondo/common/libmondo-files.c


Ignore:
Timestamp:
Jun 12, 2006, 9:55:14 AM (18 years ago)
Author:
bcornec
Message:

merge -r651:671 $SVN_M/branches/stable

File:
1 edited

Legend:

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

    r649 r672  
    11551155    fprintf(fout, "ipgateway=%s\n", nfs_client_defgw);
    11561156    fprintf(fout, "ipconf=\n");
     1157    fprintf(fout, "nfsmount=%s\n", bkpinfo->nfs_mount);
    11571158    fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");
    11581159    fprintf(fout, "    echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`\n");
     1160    fprintf(fout, "    echo $i | grep -qi nfsmount= && nfsmount=`echo $i | cut -d= -f2`\n");
    11591161    fprintf(fout, "done\n");
     1162    fprintf(fout, "nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1`\n");
    11601163    fprintf(fout, "echo \"$ipconf\" | grep -q \"dhcp\"\n");
    1161     fprintf(fout, "if [ $? = 0 ]; then\n");
     1164    fprintf(fout, "if [ $? -eq 0 ]; then\n");
    11621165    fprintf(fout, "    ipdev=`echo $ipconf | cut -d: -f1`\n");
     1166    fprintf(fout, "    echo \"Making DHCP request on $ipdev\"\n");
    11631167    fprintf(fout, "    udhcpc -i $ipdev\n");
    11641168    fprintf(fout, "else\n");
     
    11731177    fprintf(fout, "    route add default gw $ipgateway\n");
    11741178    fprintf(fout, "fi\n");
    1175     fprintf(fout, "ping -c $ipcount %s  # ping server\n", nfs_server_ipaddr);
    1176     fprintf(fout, "mount -t nfs -o nolock %s /tmp/isodir\n",
    1177             bkpinfo->nfs_mount);
     1179    fprintf(fout, "ping -c $ipcount $nfs_server_ipaddr # ping server\n");
     1180    fprintf(fout, "mount -t nfs -o nolock $nfsmount /tmp/isodir\n");
    11781181    paranoid_fclose(fout);
    11791182    chmod(outfile, 0777);
Note: See TracChangeset for help on using the changeset viewer.