Changeset 687 in MondoRescue for trunk/mondo/mondo/common/libmondo-tools.c


Ignore:
Timestamp:
Jul 17, 2006, 3:39:42 PM (18 years ago)
Author:
bcornec
Message:

merge -r671:686 $SVN_M/branches/stable

File:
1 edited

Legend:

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

    r672 r687  
    362362    assert(bkpinfo != NULL);
    363363    bkpinfo->optimal_set_size =
    364         (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type) ? 4 : 8) *
     364        (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type) ? 16 : 16) *
    365365        1024;
    366366
     
    382382
    383383    run_program_and_log_output("uname -a", 5);
     384    run_program_and_log_output("cat /etc/*-release", 5);
    384385    run_program_and_log_output("cat /etc/*issue*", 5);
    385386    asprintf(&g_tmpfs_mountpt, "%s/tmpfs", bkpinfo->tmpdir);
     
    475476        paranoid_free(mondo_mkisofs_sz);
    476477
    477         if (getenv("SUDO_COMMAND")) {
    478             fatal_error
    479                 ("Can't write DVDs as sudo because growisofs doesn't support this - please see the growisofs manpage for details.");
     478        if (getenv ("SUDO_COMMAND")) {
     479            asprintf(&command, "strings `which growisofs` | grep -c SUDO_COMMAND");
     480            if (!strcmp(call_program_and_get_last_line_of_output(command), "1")) {
     481                popup_and_OK("Fatal Error: Can't write DVDs as sudo because growisofs doesn't support this - see the growisofs manpage for details.");
     482                fatal_error("Can't write DVDs as sudo because growisofs doesn't support this - see the growisofs manpage for details.");
     483            }       
     484            paranoid_free(command);
    480485        }
    481486        log_msg(2, "call_make_iso (DVD res) is ... %s",
     
    894899    // abort if Windows partition but no ms-sys and parted
    895900    if (!run_program_and_log_output
    896         ("mount | grep -w vfat | grep -v /dev/fd | grep -v nexdisk", 0)
     901        ("mount | grep -w vfat | grep -vE \"/dev/fd|nexdisk\"", 0)
    897902        ||
    898903        !run_program_and_log_output
    899         ("mount | grep -w dos | grep -v /dev/fd | grep -v nexdisk", 0)) {
     904        ("mount | grep -w dos | grep -vE \"/dev/fd|nexdisk\"", 0)) {
    900905        log_to_screen(_("I think you have a Windows 9x partition."));
    901906        retval += whine_if_not_found("parted");
Note: See TracChangeset for help on using the changeset viewer.