Ignore:
Timestamp:
Aug 9, 2007, 3:19:05 PM (17 years ago)
Author:
Bruno Cornec
Message:
  • use of conf file for mkisofs and cdrecord commands
  • unification of cdr,cdrw and dvd
  • may not compile, modifications will continue
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1581 r1592  
    2020#include "mondostructures.h"
    2121
    22 #include "mr_conf.h"
    2322#include "mr_mem.h"
    2423#include "mr_msg.h"
     
    4140
    4241#define DVDRWFORMAT 1
    43 
    44 extern struct mr_ar_conf *mr_conf;
    4542
    4643#ifndef __FreeBSD__
     
    16591656            } else {
    16601657                log_to_screen("%s...OK", message_to_screen);
    1661                 sprintf(tmp, "tail -n10 %s | grep -F ':-('", MONDO_LOGFILE);
     1658                mr_asprintf(&tmp, "tail -n10 %s | grep -F ':-('", MONDO_LOGFILE);
    16621659                if (!run_program_and_log_output(tmp, 1)) {
    16631660                    log_to_screen
    16641661                        ("Despite nonfatal errors, growisofs confirms the write was successful.");
    16651662                }
     1663                mr_free(tmp);
    16661664            }
    16671665            retval += res;
     
    17381736        mr_free(message_to_screen);
    17391737    } else {
    1740         mr_asprintf(&message_to_screen, "Running %s to make %s #%d",
    1741                 mr_conf->iso_creation_cmd,
    1742                 bkpinfo->backup_media_string,
    1743                 g_current_media_number);
    1744         mr_msg(1, message_to_screen);
    1745         mr_asprintf(&result_sz, "Call to %s to make ISO (%s #%d) ",
    1746                 mr_conf->iso_creation_cmd,
    1747                 bkpinfo->backup_media_string,
    1748                 g_current_media_number);
    1749         if (bkpinfo->nonbootable_backup) {
    1750             mr_msg(1, "Making nonbootable backup");
    1751             res = eval_call_to_make_ISO(bkpinfo,
    1752                                         "mkisofs -o '_ISO_' -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
    1753                                         destfile, g_current_media_number,
    1754                                         MONDO_LOGFILE, message_to_screen);
    1755         } else {
    1756             mr_msg(1, "Making bootable backup");
    1757 
    1758 #ifdef __FreeBSD__
    1759             bkpinfo->make_cd_use_lilo = TRUE;
    1760 #endif
    1761 
    1762 
    1763             mr_msg(1, "make_cd_use_lilo is actually %d",
    1764                     bkpinfo->make_cd_use_lilo);
    1765             if (bkpinfo->make_cd_use_lilo) {
    1766                 mr_msg(1, "make_cd_use_lilo = TRUE");
    1767 // FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo
    1768 // and add ' .' at end
    1769 #ifdef __IA64__
    1770                 mr_msg(1, "IA64 --> elilo");
    1771                 res = eval_call_to_make_ISO(bkpinfo,
    1772                                             //-b images/mindi-boot.2880.img
    1773                                             "mkisofs -no-emul-boot -b images/mindi-bootroot."
    1774                                             IA64_BOOT_SIZE
    1775                                             ".img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
    1776                                             destfile,
    1777                                             g_current_media_number,
    1778                                             MONDO_LOGFILE,
    1779                                             message_to_screen);
    1780 #else
    1781 // FIXME --- change mkisofs string to MONDO_MKISOFS_REGULAR_SYSLINUX/LILO depending on bkpinfo->make_cd_usE_lilo
    1782 // and add ' .' at end
    1783                 mr_msg(1, "Non-ia64 --> lilo");
    1784                 res = eval_call_to_make_ISO(bkpinfo,
    1785                                             "mkisofs -b images/mindi-bootroot.2880.img -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
    1786                                             destfile,
    1787                                             g_current_media_number,
    1788                                             MONDO_LOGFILE,
    1789                                             message_to_screen);
    1790 #endif
    1791             } else {
    1792                 mr_msg(1, "make_cd_use_lilo = FALSE");
    1793                 mr_msg(1, "Isolinux");
    1794                 res = eval_call_to_make_ISO(bkpinfo,
    1795                                             "mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4 -boot-info-table -c boot.cat -o '_ISO_' -J -r -p MondoRescue -publisher www.mondorescue.org -A Mondo_Rescue_GPL -V _CD#_ .",
    1796                                             destfile,
    1797                                             g_current_media_number,
    1798                                             MONDO_LOGFILE,
    1799                                             message_to_screen);
    1800             }
    1801         }
    1802         mr_free(message_to_screen);
    1803         if (res) {
    1804             log_to_screen("%s...failed", result_sz);
    1805         } else {
    1806             log_to_screen("%s...OK", result_sz);
    1807         }
    1808         retval += res;
    1809         mr_free(result_sz);
     1738        fatal_error("call_make_iso undefined. Not normal in this case");
    18101739    }
    18111740
     
    18201749            mr_free(tmp);
    18211750        }
    1822     }
    1823 
    1824     if (bkpinfo->call_burn_iso[0] != '\0') {
    1825         mr_msg(2, "bkpinfo->call_burn_iso = %s", bkpinfo->call_burn_iso);
    1826         mr_asprintf(&message_to_screen, "Burning %s #%d",
    1827                  bkpinfo->backup_media_string,
    1828                  g_current_media_number);
    1829         pause_and_ask_for_cdr(2, &cd_is_mountable);
    1830         res = eval_call_to_make_ISO(bkpinfo, bkpinfo->call_burn_iso,
    1831                                     destfile, g_current_media_number,
    1832                                     MONDO_LOGFILE, message_to_screen);
    1833         if (res) {
    1834             log_to_screen("%s...failed", message_to_screen);
    1835         } else {
    1836             log_to_screen("%s...OK", message_to_screen);
    1837         }
    1838         mr_free(message_to_screen);
    1839         retval += res;
    18401751    }
    18411752
Note: See TracChangeset for help on using the changeset viewer.