Changeset 764 in MondoRescue for trunk/mondo/mondo


Ignore:
Timestamp:
Aug 8, 2006, 12:34:37 AM (18 years ago)
Author:
Bruno Cornec
Message:

merge -r728:763 $SVN_M/branches/stable

Location:
trunk/mondo/mondo
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/mondo/Makefile.am

    r729 r764  
    44pkgdata_DATA   = do-not-compress-these
    55scriptdir      = $(pkgdatadir)
    6 script_DATA    = autorun
    7 
    8 install-data-hook:
    9     @for prog in $(script_DATA); do \
    10       chmod +x $(scriptdir)/$$prog; \
    11     done
     6script_SCRIPTS    = autorun
  • trunk/mondo/mondo/common/libmondo-files.c

    r689 r764  
    10581058
    10591059    /*@ buffers ******** */
    1060     char *outfile = NULL;
    10611060    char *nfs_dev = NULL;
    10621061    char *nfs_mount = NULL;
     
    10711070    /*@ pointers ***** */
    10721071    char *p;
    1073     FILE *fout;
    1074 
    1075 
    10761072
    10771073    log_it("Storing NFS configuration");
     
    11231119            ("Unable to find ethN (eth0, eth1, ...) adapter via NFS mount you specified.");
    11241120    }
    1125     asprintf(&outfile, "%s/start-nfs", bkpinfo->tmpdir);
    1126     asprintf(&tmp, "outfile = %s", outfile);
    1127     log_it(tmp);
    1128     paranoid_free(tmp);
    1129 
    1130     if (!(fout = fopen(outfile, "w"))) {
    1131         fatal_error("Cannot store NFS config");
    1132     }
    1133     fprintf(fout, "#!/bin/sh\n");
    1134     fprintf(fout, "# number of ping\n");
    1135     fprintf(fout, "ipcount=3\n");
    1136     fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");
    1137     fprintf(fout, "    echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2`\n");
    1138     fprintf(fout, "done\n");
    1139     fprintf(fout, "ifconfig lo 127.0.0.1  # config loopback\n");
    1140     fprintf(fout, "ipdev=%s\n", nfs_dev);
    1141     fprintf(fout, "ipaddress=%s\n", nfs_client_ipaddr);
    1142     fprintf(fout, "ipnetmask=%s\n", nfs_client_netmask);
    1143     fprintf(fout, "ipbroadcast=%s\n", nfs_client_broadcast);
    1144     fprintf(fout, "ipgateway=%s\n", nfs_client_defgw);
    1145     fprintf(fout, "ipconf=\n");
    1146     fprintf(fout, "nfsmount=%s\n", bkpinfo->nfs_mount);
    1147     fprintf(fout, "for i in `cat /proc/cmdline` ; do\n");
    1148     fprintf(fout, "    echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2`\n");
    1149     fprintf(fout, "    echo $i | grep -qi nfsmount= && nfsmount=`echo $i | cut -d= -f2`\n");
    1150     fprintf(fout, "done\n");
    1151     fprintf(fout, "nfs_server_ipaddr=`echo $nfsmount | cut -d: -f1`\n");
    1152     fprintf(fout, "echo \"$ipconf\" | grep -q \"dhcp\"\n");
    1153     fprintf(fout, "if [ $? -eq 0 ]; then\n");
    1154     fprintf(fout, "    ipdev=`echo $ipconf | cut -d: -f1`\n");
    1155     fprintf(fout, "    echo \"Making DHCP request on $ipdev\"\n");
    1156     fprintf(fout, "    udhcpc -i $ipdev\n");
    1157     fprintf(fout, "else\n");
    1158     fprintf(fout, "    if [ \"$ipconf\" != \"\" ]; then\n");
    1159     fprintf(fout, "        ipdev=`echo $ipconf | cut -d: -f1`\n");
    1160     fprintf(fout, "        ipaddress=`echo $ipconf | cut -d: -f2`\n");
    1161     fprintf(fout, "        ipnetmask=`echo $ipconf | cut -d: -f3`\n");
    1162     fprintf(fout, "        ipbroadcast=`echo $ipconf | cut -d: -f4`\n");
    1163     fprintf(fout, "        ipgateway=`echo $ipconf | cut -d: -f5`\n");
    1164     fprintf(fout, "    fi\n");
    1165     fprintf(fout, "    ifconfig $ipdev $ipaddress netmask $ipnetmask broadcast $ipbroadcast\n");
    1166     fprintf(fout, "    route add default gw $ipgateway\n");
    1167     fprintf(fout, "fi\n");
    1168     fprintf(fout, "ping -c $ipcount $nfs_server_ipaddr # ping server\n");
    1169     fprintf(fout, "mount -t nfs -o nolock $nfsmount /tmp/isodir\n");
    1170     paranoid_fclose(fout);
    1171     chmod(outfile, 0777);
    11721121    make_hole_for_dir("/var/cache/mondo-archive");
    1173 
    1174 //  paranoid_system ("mkdir -p /var/cache/mondo-archive 2> /dev/null");
    1175 
    1176     asprintf(&tmp, "cp -f %s /var/cache/mondo-archive", outfile);
    1177     paranoid_free(outfile);
    1178 
    1179     run_program_and_log_output(tmp, FALSE);
    1180     paranoid_free(tmp);
    11811122
    11821123    asprintf(&tmp, "%s/NFS-DEV", bkpinfo->tmpdir);
  • trunk/mondo/mondo/common/newt-specific.c

    r688 r764  
    14571457
    14581458        /*@ int ************************************************************* */
    1459         int i = 0;
    14601459        int currline = 0;
    14611460        int finished = FALSE;
     1461
     1462        /*@ long ************************************************************ */
     1463        long i = 0;
    14621464        long lng = 0;
    14631465
     
    15041506        }
    15051507        asprintf(&differ_sz,
    1506                  _("  %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."),
     1508                 _("  %ld files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."),
    15071509                 i);
    15081510        newtPushHelpLine(differ_sz);
  • trunk/mondo/mondo/mondorestore/mondo-prep.c

    r729 r764  
    21902190#else
    21912191    asprintf(&program, "raidstart %s", raid_device);
    2192 //      sprintf (program, "raidstart " RAID_DEVICE_STUB "*");
    21932192#endif
    21942193    log_msg(1, "program = %s", program);
  • trunk/mondo/mondo/mondorestore/mondo-rstr-newt.c

    r729 r764  
    883883    static int lines_in_flist_window = 0;
    884884    static int depth = 0;
    885     int i = 0;
     885
     886    /** long **************************************************************/
     887    long i = 0;
    886888
    887889    /** structures *******************************************************/
     
    13631365    paranoid_free(size_str);
    13641366
    1365     newtListboxSetEntry(listbox, (int) keylist[currline],
     1367    newtListboxSetEntry(listbox, (long) keylist[currline],
    13661368                        mountlist_entry_to_string(mountlist, currline));
    13671369    /* if new /dev/md RAID device then do funky stuff */
     
    24892491{
    24902492
    2491     /** int *************************************************************/
    2492     int i = 0;
     2493    /** long **************************************************************/
     2494    long i = 0;
    24932495
    24942496    assert(disklist != NULL);
     
    25212523{
    25222524
    2523     /** int **************************************************************/
    2524     int i = 0;
     2525    /** long **************************************************************/
     2526    long i = 0;
    25252527
    25262528    assert(mountlist != NULL);
     
    25542556{
    25552557
    2556     /** int **************************************************************/
    2557     int i = 0;
     2558    /** long *************************************************************/
     2559    long i = 0;
    25582560
    25592561    /** buffers **********************************************************/
     
    25902592                void *keylist[], newtComponent listbox)
    25912593{
    2592     /** int *************************************************************/
    2593     int i = 0;
     2594    /** long ************************************************************/
     2595    long i = 0;
    25942596
    25952597    /** buffers *********************************************************/
  • trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c

    r729 r764  
    21552155    asprintf(&command, "mount /dev/fd0u1722 %s", mountpt);
    21562156    asprintf(&tmp,
    2157             "(sleep 15; kill `ps ax | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",
     2157            "(sleep 15; kill `ps | grep \"%s\" | cut -d' ' -f1` 2> /dev/null) &",
    21582158            command);
    21592159    log_msg(1, "tmp = '%s'", tmp);
Note: See TracChangeset for help on using the changeset viewer.