Changeset 1741


Ignore:
Timestamp:
Oct 30, 2007, 11:44:02 AM (12 years ago)
Author:
bruno
Message:
  • Adds magic file to depllist in order to have file working + ldd which helps for debugging issues
  • tty modes correct to avoid sh error messages
  • Use ext3 normally and not ext2 instead
  • USB device should be corrected after reading (take 1st part)
  • Adds a mount_USB_here function derived from mount_CDROM_here
Location:
branches/2.2.5
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/deplist.txt

    r1722 r1741  
    4040mount
    4141devfsd burnBX burnK6 burnK7 burnMMX burnP5 burnP6 lucifer tiobench tiotest bonnie++ mprime ide-smart
     42# helps for debugging
     43ldd
     44
     45# For file command
     46/usr/share/misc/file/magic /usr/share/file/magic
    4247
    4348# For Debug  mode
  • branches/2.2.5/mindi/rootfs/sbin/init

    r1734 r1741  
    282282    /sbin/udevd --daemon
    283283    echo $PKLVL > /proc/sys/kernel/printk
     284    # Avoids shell error messages
     285    chmod 644 /dev/tty*
    284286}
    285287
  • branches/2.2.5/mondo/src/common/libmondo-devices.c

    r1739 r1741  
    16191619 * @return 0 for success, nonzero for failure.
    16201620 */
     1621int mount_USB_here(char *device, char *mountpoint)
     1622{
     1623    /*@ buffer ****************************************************** */
     1624    char *command;
     1625    char *dev;
     1626    int retval;
     1627
     1628    malloc_string(command);
     1629    malloc_string(dev);
     1630    malloc_string(options);
     1631    assert_string_is_neither_NULL_nor_zerolength(device);
     1632    assert_string_is_neither_NULL_nor_zerolength(mountpoint);
     1633
     1634    make_hole_for_dir(mountpoint);
     1635    if (isdigit(device[0])) {
     1636        return(1);
     1637    } else {
     1638        strcpy(dev, device);
     1639    }
     1640    log_msg(4, "(mount_USB_here --- device=%s, mountpoint=%s", device,
     1641            mountpoint);
     1642
     1643#ifdef __FreeBSD__
     1644    sprintf(command, "mount_vfat %s %s 2>> %s",
     1645            device, mountpoint, MONDO_LOGFILE);
     1646
     1647#else
     1648    sprintf(command, "mount %s -t vfat %s 2>> %s",
     1649            device, options, mountpoint, MONDO_LOGFILE);
     1650#endif
     1651
     1652    log_msg(4, command);
     1653    retval = system(command);
     1654    log_msg(1, "system(%s) returned %d", command, retval);
     1655
     1656    paranoid_free(command);
     1657    paranoid_free(dev);
     1658    paranoid_free(options);
     1659    return (retval);
     1660}
     1661
     1662/**
     1663 * Mount the CD-ROM at @p mountpoint.
     1664 * @param device The device (or file if g_ISO_restore_mode) to mount.
     1665 * @param mountpoint The place to mount it.
     1666 * @return 0 for success, nonzero for failure.
     1667 */
    16211668int mount_CDROM_here(char *device, char *mountpoint)
    16221669{
     
    26472694    }
    26482695    if (!is_this_device_mounted(MNT_CDROM)) {
    2649         mount_CDROM_here(mountdev, MNT_CDROM);
     2696        if (bkpinfo->backup_media_type == usb) {
     2697            mount_USB_here(mountdev, MNT_CDROM);
     2698        } else {
     2699            mount_CDROM_here(mountdev, MNT_CDROM);
     2700        }
    26502701    }
    26512702    cd_number =
  • branches/2.2.5/mondo/src/mondorestore/mondo-prep.c

    r1645 r1741  
    25302530        strcpy(program, "mkfs.jfs");
    25312531    } else if (strcmp(format, "ext3") == 0) {
    2532         strcpy(program, "mkfs -t ext2 -F -j -q");
     2532        strcpy(program, "mkfs -t ext3 -F -q");
    25332533    } else if (strcmp(format, "minix") == 0) {
    25342534        strcpy(program, "mkfs.minix");
  • branches/2.2.5/mondo/src/mondorestore/mondo-rstr-newt.c

    r1645 r1741  
    253253    strcpy(format_str, "ufs");
    254254#else
    255     strcpy(format_str, "ext2");
     255    strcpy(format_str, "ext3");
    256256#endif
    257257    size_str[0] = '\0';
  • branches/2.2.5/mondo/src/mondorestore/mondo-rstr-tools.c

    r1740 r1741  
    574574    update_progress_form(tmp);
    575575    strcpy(format, mountlist->el[lino].format);
     576    /* BERLIOS: removed as it doen't make sens to not mount ext3 partitions as ext3
    576577    if (!strcmp(format, "ext3")) {
    577578        strcpy(format, "ext2");
    578579    }
     580    */
    579581    res = mount_device(mountlist->el[lino].device,
    580582                       mountlist->el[lino].mountpoint,
     
    692694#endif
    693695} else if (bkpinfo->backup_media_type == usb) {
    694         sprintf(mount_cmd, "mount -r %s %s", bkpinfo->media_device, MNT_CDROM);
     696        sprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM);
    695697} else if (strstr(bkpinfo->media_device, "/dev/")) {
    696698#ifdef __FreeBSD__
     
    10111013            fatal_error("Cannot get USB device name from cfg file");
    10121014        }
    1013         strcpy(bkpinfo->media_device, value);
     1015        sprintf(bkpinfo->media_device, "%s1", value);
    10141016        sprintf(tmp, "Backup medium is USB --- dev=%s", bkpinfo->media_device);
    10151017        log_msg(2, tmp);
Note: See TracChangeset for help on using the changeset viewer.