Changeset 236 for trunk/mondo/mondo


Ignore:
Timestamp:
Dec 19, 2005, 7:31:56 PM (14 years ago)
Author:
bcornec
Message:

merge -r229:235 $SVN_M/branches/2.05

Location:
trunk/mondo/mondo/common
Files:
2 edited

Legend:

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

    r197 r236  
    17141714            paranoid_free(command);
    17151715
    1716             asprintf(&tmp, "mount %s -t nfs %s", bkpinfo->nfs_mount,
     1716            asprintf(&tmp, "mount -t nfs -o nolock %s %s", bkpinfo->nfs_mount,
    17171717                    bkpinfo->isodir);
    17181718            run_program_and_log_output(tmp, 5);
  • trunk/mondo/mondo/common/libmondo-files.c

    r226 r236  
    11081108        fatal_error("Cannot store NFS config");
    11091109    }
     1110    fprintf(fout, "#!/bin/sh\n");
     1111    fprintf(fout, "# number of ping\n");
     1112    fprintf(fout, "ipcount=3\n");
     1113    fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");
     1114    fprintf(fout, "    echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2`\n");
     1115    fprintf(fout, "done\n");
    11101116    fprintf(fout, "ifconfig lo 127.0.0.1  # config loopback\n");
    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);
    1113     fprintf(fout, "route add default gw %s  # default route\n", nfs_client_defgw);
    1114     fprintf(fout, "ping -c 1 %s # ping server\n", nfs_server_ipaddr);
     1117    fprintf(fout, "ipaddress=%s\n", nfs_client_ipaddr);
     1118    fprintf(fout, "ipnetmask=%s\n", nfs_client_netmask);
     1119    fprintf(fout, "ipbroadcast=%s\n", nfs_client_broadcast);
     1120    fprintf(fout, "ipgateway=%s\n", nfs_client_defgw);
     1121    fprintf(fout, "ipconf=\n");
     1122    fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");
     1123    fprintf(fout, "    echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`\n");
     1124    fprintf(fout, "done\n");
     1125    fprintf(fout, "if [ \"$ipconf\" = \"dhcp\" ]; then\n");
     1126    fprintf(fout, "    udhcpc -i %s\n", nfs_dev);
     1127    fprintf(fout, "else\n");
     1128    fprintf(fout, "    if [ \"$ipconf\" != \"\" ]; then\n");
     1129    fprintf(fout, "        ipaddress=`echo $ipconf | cut -d: -f1`\n");
     1130    fprintf(fout, "        ipnetmask=`echo $ipconf | cut -d: -f2`\n");
     1131    fprintf(fout, "        ipbroadcast=`echo $ipconf | cut -d: -f3`\n");
     1132    fprintf(fout, "        ipgateway=`echo $ipconf | cut -d: -f4`\n");
     1133    fprintf(fout, "    fi\n");
     1134    fprintf(fout, "    ifconfig %s $ipaddress netmask $ipnetmask broadcast $ipbroadcast\n", nfs_dev);
     1135    fprintf(fout, "    route add default gw $ipgateway\n");
     1136    fprintf(fout, "fi\n");
     1137    fprintf(fout, "ping -c $ipcount %s  # ping server\n", nfs_server_ipaddr);
    11151138    fprintf(fout, "mount -t nfs -o nolock %s /tmp/isodir\n",
    11161139            bkpinfo->nfs_mount);
    1117     fprintf(fout, "exit 0\n");
    11181140    paranoid_fclose(fout);
    11191141    chmod(outfile, 0777);
Note: See TracChangeset for help on using the changeset viewer.