Changeset 2598


Ignore:
Timestamp:
Mar 17, 2010, 3:55:40 AM (10 years ago)
Author:
bruno
Message:

r3742@localhost: bruno | 2010-03-15 01:52:11 +0100

  • Fix mindi/mondoarchive interface for common files
Location:
branches/2.2.10
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/mindi

    r2597 r2598  
    13611361            cp -f $j $MINDI_TMP 2>> $LOGFILE || Die "Failed to copy $j to $MINDI_TMP"
    13621362            if [ _"$MONDO_SHARE" != _"" ]; then
    1363                 cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1363                cp -f $j $MONDO_CACHE 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_CACHE"
    13641364            fi
    13651365        fi
     
    13691369    cp $MINDI_TMP/initrd.img $MINDI_TMP/iso/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MINDI_TMP/iso/initrd.img. Did you run out of disk space?"
    13701370    if [ _"$MONDO_SHARE" != _"" ]; then
    1371         cp $kernelpath $MONDO_ROOT/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
    1372         cp $MINDI_TMP/initrd.img $MONDO_ROOT/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MONDO_ROOT/initrd.img. Did you run out of disk space?"
     1371        cp $kernelpath $MONDO_CACHE/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_CACHE/vmlinuz). Did you run out of disk space?"
     1372        cp $MINDI_TMP/initrd.img $MONDO_CACHE/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MONDO_CACHE/initrd.img. Did you run out of disk space?"
    13731373    fi
    13741374    MakeBootConfFile isolinux > $MINDI_TMP/iso/isolinux.cfg
     
    13801380    if [ "$ARCH" != "ia64" ] ; then
    13811381        if [ _"$MONDO_SHARE" != _"" ]; then
    1382             cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?"
     1382            cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_CACHE 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_CACHE). Did you run out of disk space?"
    13831383            cp -f $MONDO_SHARE/autorun $MINDI_TMP/iso 2>> $LOGFILE
    13841384        fi
     
    24482448DONE="\r\t\t\t\t\t\t\t\tDone.         "
    24492449kernelpath=""
    2450 MONDO_ROOT=/var/cache/mondo
    2451 mkdir -p $MONDO_ROOT
    24522450
    24532451if [ -d "/proc/lvm" ]; then
     
    26192617        mkdir -p $MINDI_TMP
    26202618
    2621         # This is the scratch dir in mondo - subdir images
    2622         MINDI_CACHE=$3
     2619        # This is the scratch dir in mondo - subdir images
     2620        # Now useless
     2621        #MINDI_CACHE=$3
    26232622
    26242623        kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
     
    26792678           LogAll "Using modules for kernel: ${kernelname}"
    26802679        fi
    2681         # MONDO_ROOT is the real scratchdir
    2682         MONDO_ROOT=`echo $MINDI_CACHE | sed 's/\(.*\)\/.*/\1/'`
    2683         if [ _"$MONDO_ROOT" != _"" ]; then
    2684             mkdir -p $MONDO_ROOT
    2685         else
    2686             Die "MONDO_ROOT is undefined"
    2687         fi
     2680
     2681        MONDO_CACHE=/var/cache/mondo
     2682        mkdir -p $MONDO_CACHE
    26882683    else
    26892684        LogScreen "Syntax: mindi (--custom ....)"
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2595 r2598  
    839839    if (!res) {
    840840        log_to_screen("Boot+data disks were created OK");
    841         mr_asprintf(command, "cp -f %s/images/mindi.iso %s/mondorescue.iso", bkpinfo->scratchdir, MINDI_CACHE);
     841        mr_asprintf(command, "cp -f /%s/images/mindi.iso %s/mondorescue.iso", MINDI_CACHE_REL, MINDI_CACHE);
    842842        log_msg(2, command);
    843843        run_program_and_log_output(command, FALSE);
     
    858858            mr_free(command);
    859859        } else {
    860             mr_asprintf(tmp, "cp -f %s/images/all.tar.gz %s", bkpinfo->scratchdir, bkpinfo->tmpdir);
     860            mr_asprintf(tmp, "cp -f /%s/all.tar.gz %s", MINDI_CACHE_REL, bkpinfo->tmpdir);
    861861            if (system(tmp)) {
    862862                mr_free(tmp);
     
    15821582    char *message_to_screen = NULL;
    15831583    char *sz_blank_disk = NULL;
    1584     char *tmp2 = NULL;
    1585     char *tmp3 = NULL;
    15861584    char *mds = NULL;
    15871585    bool cd_is_mountable;
     
    15911589    assert_string_is_neither_NULL_nor_zerolength(destfile);
    15921590
    1593     mr_asprintf(tmp, "%s/isolinux.bin", bkpinfo->scratchdir);
    1594     mr_asprintf(tmp2, "%s/isolinux.bin", bkpinfo->tmpdir);
    1595     if (does_file_exist(tmp)) {
    1596         mr_asprintf(tmp3, "cp -f %s %s", tmp, tmp2);
    1597         paranoid_system(tmp3);
    1598         mr_free(tmp3);
    1599     }
    1600     if (!does_file_exist(tmp) && does_file_exist(tmp2)) {
    1601         mr_asprintf(tmp3, "cp -f %s %s", tmp2, tmp);
    1602         paranoid_system(tmp3);
    1603         mr_free(tmp3);
    1604     }
    1605     mr_free(tmp2);
     1591    /* Copy the files needed by isolinux in the right dir */
     1592    mr_asprintf(tmp, "mv "MONDO_CACHE"/{isolinux.cfg,isolinux.bin,message.txt,vmlinuz,initrd.img} %s", bkpinfo->scratchdir);
     1593    paranoid_system(tmp);
    16061594    mr_free(tmp);
    16071595
Note: See TracChangeset for help on using the changeset viewer.