Changeset 289


Ignore:
Timestamp:
Jan 10, 2006, 9:35:09 AM (14 years ago)
Author:
bcornec
Message:

Abort when one of the include dirs (-I) does not exist (bug reported by jeff@…)
A warning is also logged for the -E option

Location:
branches/2.06
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mindi/mindi

    r285 r289  
    20172017    cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root"
    20182018    if [ -e "$MONDO_TMP/start-nfs" ] ; then
    2019     mv syslinux.cfg syslinux.cfg.orig
    2020     sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg
     2019        mv syslinux.cfg syslinux.cfg.orig
     2020        sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg
    20212021    fi
    20222022    cd $old_pwd
     
    20242024    cp -f $TMP_ROOT/mindi.rdz $mountpoint/initrd.img 2>> $LOGFILE
    20252025    if [ "$?" -ne "0" ] ; then
    2026     LogIt "Failed to copy $TMP_ROOT/mindi.rdz to $mountpoint\n"
    2027     cat $TMP_ROOT/mtpt.$$ >> $LOGFILE
    2028     LogIt "Please unload some of your modules and try again.\n"
    2029     rm -f $TMP_ROOT/mtpt.$$
    2030     LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)\n"
     2026        LogIt "Failed to copy $TMP_ROOT/mindi.rdz to $mountpoint\n"
     2027        cat $TMP_ROOT/mtpt.$$ >> $LOGFILE
     2028        LogIt "Please unload some of your modules and try again.\n"
     2029        rm -f $TMP_ROOT/mtpt.$$
     2030        LogIt "Cannot incorporate mindi.rdz in bootdisk (kernel / modules too big?)\n"
    20312031        retval=$(($retval+1))
    20322032    fi
     
    20412041    cp -f $kernelpath $mountpoint/vmlinuz &> /dev/null
    20422042    if [ "$?" -ne "0" ] || [ "$FORCE_DUAL_FLOPPIES" = "yes" ] ; then
    2043     echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
    2044     du -sk $mountpoint/* >> $LOGFILE
    2045     echo "--- end of list of files ---" >> $LOGFILE
    2046     echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
     2043        echo "Files at mountpoint ($mountpoint) :-" >> $LOGFILE
     2044        du -sk $mountpoint/* >> $LOGFILE
     2045        echo "--- end of list of files ---" >> $LOGFILE
     2046        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n\
    20472047Sorry, your kernel is too big for a boot/root floppy.\nI'll try the new boot/root two-disk thingy.\n" >> $LOGFILE
    20482048        rm -f $mountpoint/vmlinuz
    2049     cd $old_pwd
     2049        cd $old_pwd
    20502050        umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    20512051        rmdir $mountpoint || LogIt "Cannot rmdir (PBDI)\n"
     
    31923192else
    31933193    if ! PrepareBootDiskImage_SYSLINUX $imagesdir 1722 $kernelpath $ramdisk_size ; then
    3194     LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"
    3195     LogIt "if you want to make a 1.72MB floppy disk.\n"
     3194        LogIt "Warning - failed to create 1.72MB boot image. Please reduce your kernel's size\n"
     3195        LogIt "if you want to make a 1.72MB floppy disk.\n"
    31963196    fi
    31973197    if ! PrepareBootDiskImage_SYSLINUX $imagesdir 2880 $kernelpath $ramdisk_size ; then
  • branches/2.06/mondo/mondo/mondoarchive/mondo-cli.c

    r273 r289  
    360360    long itbs;
    361361
     362    struct stat buf;
     363
    362364    malloc_string(tmp);
    363365    malloc_string(psz);
     
    439441        if (bkpinfo->include_paths[0]) {
    440442            strcat(bkpinfo->include_paths, " ");
     443        }
     444        if (stat(flag_val['I'], &buf) != 0) {
     445            log_msg("ERROR ! %s doesn't exist", flag_val['I']);
     446            fatal_error("ERROR ! You specified a directory to include which doesn't exist");
    441447        }
    442448        strncpy(bkpinfo->include_paths + strlen(bkpinfo->include_paths),
     
    652658        if (bkpinfo->exclude_paths[0]) {
    653659            strcat(bkpinfo->exclude_paths, " ");
     660        }
     661        if (stat(flag_val['E'], &buf) != 0) {
     662            log_msg(1, "WARNING ! %s doesn't exist", flag_val['E']);
    654663        }
    655664        strncpy(bkpinfo->exclude_paths + strlen(bkpinfo->exclude_paths),
Note: See TracChangeset for help on using the changeset viewer.