Changeset 2937 in MondoRescue for branches/3.1/mondo/src/common


Ignore:
Timestamp:
Jan 28, 2012, 1:51:28 AM (13 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2849:2935 ../3.0

  • Adds 3 binaries called potentially by udev o support USB key mount at restore time (Victor Gattegno)
  • mindi only sets the boot flag of a USB device if none is present already (should avoid flip/flop situation)
  • Fix a compatibility bug in analyze-my-lvm whete exclude lists with '|' was incorrectly analyzed (' ' still expected)
  • Precise that -J is not supported by mondorestore yet.
  • Fix a compatibility bug in mindi where exclude lists with '|' was incorrectly analyzed (' ' still expected)
  • Install an MBR on USB devices when possible
  • Improve error message in case mondorestore isn't found
  • Adds support for more virtio devices for KVM restore
  • Improve mbr.bin handling
  • Fix an issue in test of FindKernel for Xen and non Xen cases
    • Fix #492 by removing an extra useless fi
    • Move fvat nd fat modules to CDROM_MODS in order to have them in the initrd to support saving logs to a USB device e.g.
    • Fix an error when dmidecode reports comments before system name
    • Fix previous broken patch on comment management for bkphw
    • Improve msgs printed during kbd analysis
    • Fix a small remaining pb with new comment support
    • Try to again improve the mount/umount stuff in mondo -Adds mention to OEL, CentOS, ScientifLinux as RHEL clones
  • Fix a panadoid_free done on the wrong variable (solve a memory leak)
  • Solve #495 by skipping the potential (auto-read-only) when analyzin /proc/mdstat result
  • Fix some markup in man pages
  • adds the post-nuke script sample for Debian (Guillaume Pernot/Andrée Leidenfrost)
  • Avoid a useless umount when changing of afio set, let insist_on_cd check and perform if needed
  • Copy everything under .ssh of root account to allow for sshfs mount without passwd at restore time.
  • Adds support for bnx2i driver
  • Try to fix #496 by supporting the protocol in the output of the mount command (sshfs#...)
  • Uses the -d option of the mount command to avoid leaving loop devices in use. Probably provoked by the usage of a more recent busybox, but anyway that option doesn't hurt, and does nothing for non-loop devices. Should fix the problems reported on the ML with NFS and more than 8 ISO images (8 being the default number of loop devices available)
  • Attempt to fix #436 by adding some newtDrawForm where appropriate.
  • Fix bugs in the kernel detection routine of mindi (some echo were done without capturing their output, confusing the return). This should also help the Xen detection issue
  • Change the logging function to be nearer from 2.2.10, and start using some
  • Initialize some global fields with an empty string, now that newt Draws more regularly progress forms
  • Mindi progression still not good, but showing now 3% when calling mindi. Would need a specific handling for the progress bar to evolve more afterwards
  • Add compatibility with the latest SSSTK + PSP content for HP ProLiant + branding homogeneous now. We only take conrep out of the SSSTK pending a package availability. Using hpacuscripting now. Review of parameters called following test made.
  • Fix #501 by pushing BOOT_SIZE to 36864 for certain Ubuntu cases
  • Fix some remaining inconsistencis in the ProLiant HW backup. ready for usage.
  • Fix an issue on udevadm call (needs an intermediate variable)
  • Fix a remaining ProLiant tool call
  • Remove again some wrong variable initialization for Net in order to not have strange messages now we call Draw more often
  • Adds support for hwaddr (MAC addresses) at restore time, and map to the correct NIC if it's found at restore time (based on code from Stefan Heijmans)
  • Try to Fix #499 by changing init in order to never exit, and rebooting using sysrq in /proc (not portable). Maybe should move to using a real init, and a separated rcS script.
  • Fixes the shell msg error by using setsid as per Busybox FAQ
  • Fix #491 by correctly checking Xen kernel used for a dom0 env (apollo13)
  • Improves logging in Die()
  • Improve again ProLiant HW support, by adding references to the yet to come SSSTK rpm so that conrep is called at its future right place.
  • Improve mindi support for kernel 3.x
  • Fix #499 for good, by using a real init from busybox and moving our init script to etc/init.d/rcS. We also now call the reboot from busybox to exit, which indeed reset the system correctly (in a VM at least which wasn't the case before). Reauires a new mindi-busybox as well.
  • Attempt to solve #503 by handling /lib64 separately for udev and only if not a link (to /lib) for Ubuntu 64
  • Improve again previous tests for bug #503
  • Improve -d option description for NFS
  • Allow http download for ftp content
  • New italian mirror
  • Fix #505 by documenting environment variables
    • Fix a bug where on OBDR mode compression was turned off to create the OBDR content but not back on (report from the mailing list)
  • solve http://trac.mondorescue.org/ticket/520 by Victor Gattegno
  • Fix #524 as option -U needs a size also
  • Removes useless gendf option
  • Fix #511 now stabgrub is called also after conf file modifications
  • Adds support for SUID binaries
  • remove a useless xenkernelname variable from mindi
  • Should fix #512 by clearing old scratchdir before changing to a new
  • Simplify the function engaging SCSI for Smart Array controllers, and support as many controller as we have
  • Add some binaries used on SLES 10 by udev
  • Fix a syntax issue in newt-specific.c
  • Fix a memory free bug where a used variable was freed to early
  • Fix a memory free bug where a used variable was misused in asprintf/free
  • Fix #498 by using an external program (hpsa_obdr_mode) which can set the mode of the tape to CD-ROM or Sequential at will.

That program will have to be downloaded from http://cciss.sf.net

  • Adds support for the route command in mindi-busybox
  • Force block size back to 32768 in OBDR mode after skipping the 2 tape marks, to read the additional rootfs data corerctly - Fix #498 for good it seems
  • Adds support for a new pata_atiixp driver
  • Fix #525 and improve printing when no /etc/raidtab, but still md devices
  • Exclude /run similarly to /sys and /proc
  • Fix a bug in mindi when having multiple swap partiions with same starting string (/dev/dm-1 and /dev/dm-16). We now add a space in the grep to avoid mischoice.
  • Fix grub installation if we had to go in the hack part which wasn't using the correct variables to make decisions !
  • Remove all mention of mondorescue.com from code
  • Fix some website typo on the download page and precise that we now develop on Mageia
  • Exclude sysfs devpts and tmpfs partitions found in RHEL 6.2 from analyze by mindi (made error messages)
  • Force activation of first partition which should not be optional as everything is destroyed before
  • Fix a bug in analyze-my-lvm where LVs were created in random order (the one of lvscan) instead of using the dm-xxx order, which creates issues at restore time between the mapping created then and the one we had at backup time which could be inconssistent

-mondoarchive now exists if the mt command is missing when needed

  • Proper fix for analyze-my-lvm
  • Fix #500 and #473 by adding support of old metadata format for mdadm if using grub < 0.9x or lilo on a md boot device (to be tested)
  • Really never inject or eject when the -e option is passed or device is inappropriate (USB, Net, ...)
  • Fix #577 by having factor back as a float (not a long ! it's a decimal value) and making the appropriate cast.
  • Fix #578 by improving the regexp used for CD/DVD detection with -scanbus option
  • Adds more verbosity when LVM creation fails.
  • Fix #579 by checking with pipes on both sides of the string
  • debugfs should be excluded from the device considered for fstab analysis
Location:
branches/3.1/mondo/src/common
Files:
14 edited

Legend:

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

    r2850 r2937  
    483483 * - @c compression_level
    484484 * - @c differential
    485  * - @c exclude_paths
    486485 * - @c image_devs
    487486 * - @c kernel_path
     
    610609
    611610    if (!bkpinfo->nonbootable_backup && (bkpinfo->boot_loader == '\0' || bkpinfo->boot_device == NULL)) {
     611        update_evalcall_form(2);
    612612
    613613#ifdef __FreeBSD__
     
    782782    mr_free(command);
    783783    log_msg(1, "lines_in_filelist = %ld", lines_in_filelist);
     784    update_evalcall_form(3);
    784785
    785786    /*                          1           2  3          4    5    6    7   8    9    10 */
     
    832833
    833834    mvaddstr_and_log_it(g_currentY, 0, "Calling MINDI to create boot+data disks");
     835    open_evalcall_form("Calling MINDI to create boot+data disks");
    834836    res = run_external_binary_with_percentage_indicator_NEW("Generating boot+data disks", command);
     837    update_evalcall_form(99);
    835838    paranoid_free(command);
    836839
     
    874877        mr_free(tmp);
    875878    }
     879    close_evalcall_form();
    876880    return (res);
    877881}
     
    14711475    log_msg(2, "make_usb_fs --- scratchdir=%s", bkpinfo->scratchdir);
    14721476    (void) getcwd(old_pwd, MAX_STR_LEN - 1);
    1473     mr_asprintf(tmp, "chmod 755 %s", bkpinfo->scratchdir);
     1477    mr_asprintf(tmp, "chmod 700 %s", bkpinfo->scratchdir);
    14741478    run_program_and_log_output(tmp, FALSE);
    14751479    mr_free(tmp);
     
    14991503    run_program_and_log_output(tmp, FALSE);
    15001504    mr_free(tmp);
     1505
    15011506
    15021507    /* Mindi always create one single parition on the USB dev */
     
    15951600    log_msg(2, "make_iso_fs --- scratchdir=%s --- destfile=%s", bkpinfo->scratchdir, destfile);
    15961601    (void) getcwd(old_pwd, MAX_STR_LEN - 1);
    1597     mr_asprintf(tmp, "chmod 755 %s", bkpinfo->scratchdir);
     1602    mr_asprintf(tmp, "chmod 700 %s", bkpinfo->scratchdir);
    15981603    run_program_and_log_output(tmp, FALSE);
    15991604    mr_free(tmp);
     
    25992604
    26002605    if (!ok_go_ahead_burn_it) {
    2601         eject_device(cdrom_dev);
     2606        if (!bkpinfo->please_dont_eject) {
     2607            eject_device(cdrom_dev);
     2608        }
    26022609        mds = media_descriptor_string(g_backup_media_type);
    26032610        mr_asprintf(tmp, "I am about to burn %s #%d of the backup set. Please insert %s and press Enter.", mds, g_current_media_number, mds);
     
    32543261        run_program_and_log_output("umount " MNT_CDROM, FALSE);
    32553262//    if (bkpinfo->backup_media_type != iso && !bkpinfo->please_dont_eject_when_restoring)
    3256 //{
    3257         eject_device(bkpinfo->media_device);
    3258 //}
     3263        if (!bkpinfo->please_dont_eject) {
     3264            eject_device(bkpinfo->media_device);
     3265        }
    32593266    }
    32603267    mr_asprintf(tmp, "%s/changed.files", MONDO_CACHE);
  • branches/3.1/mondo/src/common/libmondo-cli.c

    r2850 r2937  
    488488            *p = '\0';
    489489        }
    490         mr_asprintf(tmp1, "mount | grep -E \"^[%s@]*%s[/]* .*\" | cut -d' ' -f3", bkpinfo->netfs_user, bkpinfo->netfs_mount);
     490        mr_asprintf(tmp1, "mount | grep -E \"^[a-z]*#*[%s@]*%s[/]* .*\" | cut -d' ' -f3", bkpinfo->netfs_user, bkpinfo->netfs_mount);
    491491        mr_free(bkpinfo->isodir);
    492492        bkpinfo->isodir = call_program_and_get_last_line_of_output(tmp1,TRUE);
     
    776776
    777777    if (flag_set['S']) {
     778        /* Before changing remove old ones if any */
     779        if (bkpinfo->scratchdir) {
     780            chdir("/tmp");
     781            mr_asprintf(tmp1, "rm -Rf %s", bkpinfo->scratchdir);
     782            paranoid_system(tmp1);
     783            mr_free(tmp1);
     784        }
    778785        mr_asprintf(bkpinfo->scratchdir, "%s/mondo.scratch.%ld", flag_val['S'], random() % 32768);
    779786    }
  • branches/3.1/mondo/src/common/libmondo-devices.c

    r2850 r2937  
    9494{
    9595//  log_it("rctada: Retracting all CD trays", __LINE__);
    96     if (strlen(g_cdrom_drive_is_here) > 0) {
    97         inject_device(g_cdrom_drive_is_here);
    98     }
    99     if (strlen(g_dvd_drive_is_here) > 0) {
    100         inject_device(g_dvd_drive_is_here);
    101     }
    102     if (strlen(g_cdrw_drive_is_here) > 0) {
    103         inject_device(g_cdrw_drive_is_here);
     96    if (!bkpinfo->please_dont_eject) {
     97        if (strlen(g_cdrom_drive_is_here) > 0) {
     98            inject_device(g_cdrom_drive_is_here);
     99        }
     100        if (strlen(g_dvd_drive_is_here) > 0) {
     101            inject_device(g_dvd_drive_is_here);
     102        }
     103        if (strlen(g_cdrw_drive_is_here) > 0) {
     104            inject_device(g_cdrw_drive_is_here);
     105        }
    104106    }
    105107//  log_it("rctada: killing autorun");
     
    537539    tmp1 = find_home_of_exe(cdr_exe);
    538540    if (tmp1) {
    539         mr_asprintf(command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep CD | cut -d' ' -f2 | head -n1", cdr_exe);
     541        mr_asprintf(command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -E '[D|C][V|D]' | cut -d' ' -f2 | head -n1", cdr_exe);
    540542        tmp = call_program_and_get_last_line_of_output(command,TRUE);
    541543        mr_free(command);
     
    846848    }
    847849
    848     tmp = call_program_and_get_last_line_of_output("dvdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep DVD | cut -d':' -f1",TRUE);
     850    tmp = call_program_and_get_last_line_of_output("dvdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep -E '[D|C][V|D]' | cut -d':' -f1",TRUE);
    849851    log_msg(5, "tmp = '%s'", tmp);
    850852    if (!tmp[0])
    851853        mr_free(tmp);
    852         tmp = call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep DVD | cut -d':' -f1",TRUE);
     854        tmp = call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep \") '\" | grep -n \"\" | grep -E '[D|C][V|D]' | cut -d':' -f1",TRUE);
    853855    if (tmp[0]) {
    854856        devno = atoi(tmp) - 1;
     
    14481450    if ((res = what_number_cd_is_this()) != cd_number_i_want) {
    14491451        log_msg(3, "Currently, we hold %d but we want %d", res, cd_number_i_want);
     1452
     1453        /* Now we need to umount the current media to have the next mounted after */
     1454        run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
     1455        log_msg(3, "Mounting next media %d",cd_number_i_want);
     1456        g_current_media_number = cd_number_i_want;
     1457        mount_media();
     1458
    14501459        mds = media_descriptor_string(bkpinfo->backup_media_type);
    14511460        log_msg(3, "Insisting on %s #%d", mds, cd_number_i_want);
     
    14571466            if (is_this_device_mounted(MNT_CDROM)) {
    14581467                res =
    1459                     run_program_and_log_output("umount " MNT_CDROM, FALSE);
     1468                    run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    14601469            } else {
    14611470                res = 0;
     
    19952004char *tmp = NULL;
    19962005char *tmp1 = NULL;
     2006char *tmp2 = NULL;
    19972007
    19982008if (pathlist == NULL) {
     
    20522062        /*  Adds a | to ensure correct detection even at both ends */
    20532063        mr_asprintf(tmp1,"|%s",token);
     2064        mr_asprintf(&tmp2,"|%s|",token);
    20542065        if (mode == 'E') {
    20552066            /*  Add the token if not already in the list */
    20562067            mr_asprintf(tmp,"|%s|",bkpinfo->exclude_paths);
    2057             if (strstr(tmp,tmp1) == NULL) {
     2068            if (strstr(tmp,tmp2) == NULL) {
    20582069                if (bkpinfo->exclude_paths) {
    20592070                    mr_strcat(bkpinfo->exclude_paths,tmp1);
     
    20662077            /*  Add the token if not already in the list */
    20672078            mr_asprintf(tmp,"|%s|",bkpinfo->include_paths);
    2068             if (strstr(tmp,tmp1) == NULL) {
     2079            if (strstr(tmp,tmp2) == NULL) {
    20692080                mr_strcat(bkpinfo->include_paths, "%s", tmp1);
    20702081            }
     
    20722083        }
    20732084        mr_free(tmp);
     2085        mr_free(tmp2);
    20742086        break;
    20752087    }
  • branches/3.1/mondo/src/common/libmondo-filelist.c

    r2874 r2937  
    13661366#if linux
    13671367        // 2.6 has /sys as a proc-type thing -- must be excluded
    1368         mr_asprintf(strtmp, "find '%s' -maxdepth %d -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o -fstype none -prune -o %s -type d -print > %s 2> /dev/null", dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist);
     1368        mr_asprintf(strtmp, "find '%s' -maxdepth %d -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o fstype devtmpfs -prune -o -fstype proc -prune -o -fstype selinuxfs -prune -o -fstype securityfs -prune -o -fstype hugetlbfs -o -fstype cgroup -prune -prune -o -fstype mqueue -prune -o -fstype debugfs -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o -fstype none -prune -o %s -type d -print > %s 2> /dev/null", dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist);
    13691369#else
    13701370        // On BSD, for example, /sys is the kernel sources -- don't exclude
     
    15821582        mr_free(tmp1);
    15831583
    1584         mr_asprintf(exclude_paths, MONDO_CACHE"|%s|%s|%s|.|..|"MNT_CDROM"|"MNT_FLOPPY"|/media|/tmp|/proc|/sys|/dev/shm|"MINDI_CACHE, tmp2, (bkpinfo->tmpdir[0] == '/' && bkpinfo->tmpdir[1] == '/') ? (bkpinfo->tmpdir + 1) : bkpinfo->tmpdir, (bkpinfo->scratchdir[0] == '/' && bkpinfo->scratchdir[1] == '/') ? (bkpinfo->scratchdir + 1) : bkpinfo->scratchdir);
     1584        mr_asprintf(exclude_paths, MONDO_CACHE"|%s|%s|%s|.|..|"MNT_CDROM"|"MNT_FLOPPY"|/media|/tmp|/proc|/sys|/run|/dev/shm|"MINDI_CACHE, tmp2, (bkpinfo->tmpdir[0] == '/' && bkpinfo->tmpdir[1] == '/') ? (bkpinfo->tmpdir + 1) : bkpinfo->tmpdir, (bkpinfo->scratchdir[0] == '/' && bkpinfo->scratchdir[1] == '/') ? (bkpinfo->scratchdir + 1) : bkpinfo->scratchdir);
    15851585        if (excp != NULL) {
    15861586            mr_strcat(exclude_paths,"|%s",excp);
  • branches/3.1/mondo/src/common/libmondo-files-EXT.h

    r2569 r2937  
    4545extern long size_of_partition_in_mountlist_K(char *tmpdir, char *dev);
    4646
    47 extern int make_grub_install_scriptlet(char *outfile);
    4847extern int read_one_liner_data_file(char *fname, char *contents);
  • branches/3.1/mondo/src/common/libmondo-files.c

    r2850 r2937  
    904904    if (res) {
    905905        log_to_screen("Please install '%s'. I cannot find it on your system.", fname);
    906         log_to_screen("There may be hyperlink at http://www.mondorescue.com which");
     906        log_to_screen("There may be hyperlink at http://www.mondorescue.org which");
    907907        log_to_screen("will take you to the relevant (missing) package.");
    908908        return (1);
     
    10631063    /*@ buffers ******** */
    10641064    char *netfs_dev = NULL;
    1065     char *mac_addr = NULL;
     1065    char *netfs_client_hwaddr = NULL;
    10661066    char *netfs_mount = NULL;
    10671067    char *netfs_client_ipaddr = NULL;
     
    11271127    if (!strncmp(netfs_dev, "bond", 4) || !strncmp(netfs_dev, "alb", 3) || !strncmp(netfs_dev, "aft", 3)) {
    11281128        log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", netfs_dev);
    1129         mr_asprintf(command, "%s", "ifconfig %s | awk '{print $5}' | head -n1", netfs_dev);
    1130         mac_addr = call_program_and_get_last_line_of_output(command,TRUE);
     1129
     1130        mr_asprintf(command, "ifconfig %s | awk '{print $5}' | head -n1", netfs_dev);
     1131        netfs_client_hwaddr = call_program_and_get_last_line_of_output(command,TRUE);
    11311132        mr_free(command);
    11321133
    1133         mr_asprintf(command, "ifconfig | grep -E '%s' | grep -v '%s' | head -n1 | cut -d' ' -f1", mac_addr,netfs_dev);
    1134         mr_free(mac_addr);
     1134        mr_asprintf(command, "ifconfig | grep -E '%s' | grep -v '%s' | head -n1 | cut -d' ' -f1", netfs_client_hwaddr, netfs_dev);
    11351135        mr_free(netfs_dev);
    11361136
     
    11511151    mr_free(netfs_mount);
    11521152
    1153     mr_asprintf(tmp, "%s/NETFS-SERVER-PATH", bkpinfo->tmpdir);
    1154     write_one_liner_data_file(tmp, bkpinfo->netfs_remote_dir);
    1155     mr_free(tmp);
    1156 
    11571153    mr_asprintf(tmp, "%s/NETFS-CLIENT-IPADDR", bkpinfo->tmpdir);
    11581154    write_one_liner_data_file(tmp, netfs_client_ipaddr);
     1155    mr_free(tmp);
     1156
     1157    mr_asprintf(tmp, "%s/NETFS-CLIENT-HWADDR", bkpinfo->tmpdir);
     1158    write_one_liner_data_file(tmp, netfs_client_hwaddr);
    11591159    mr_free(tmp);
    11601160
     
    13061306}
    13071307
    1308 
    1309 /**
    1310  * Create a small script that mounts /boot, calls @c grub-install, and syncs the disks.
    1311  * @param outfile Where to put the script.
    1312  * @return 0 for success, 1 for failure.
    1313  */
    1314 int make_grub_install_scriptlet(char *outfile)
    1315 {
    1316     FILE *fout;
    1317     char *tmp = NULL;
    1318     int retval = 0;
    1319 
    1320     if ((fout = fopen(outfile, "w"))) {
    1321         fprintf(fout,
    1322                 "#!/bin/sh\n\nmount /boot > /dev/null 2> /dev/null\ngrub-install $@\nres=$?\nsync;sync;sync\nexit $res\n");
    1323         paranoid_fclose(fout);
    1324         log_msg(2, "Created %s", outfile);
    1325         mr_asprintf(tmp, "chmod +x %s", outfile);
    1326         paranoid_system(tmp);
    1327         mr_free(tmp);
    1328         retval = 0;
    1329     } else {
    1330         retval = 1;
    1331     }
    1332     return (retval);
    1333 }
    1334 
    13351308/* @} - end fileGroup */
  • branches/3.1/mondo/src/common/libmondo-files.h

    r2569 r2937  
    4444int make_hole_for_dir(const char *outdir_fname);
    4545long size_of_partition_in_mountlist_K(char *tmpdir, char *dev);
    46 int make_grub_install_scriptlet(char *outfile);
    47 
    4846int read_one_liner_data_file(char *fname, char *contents);
  • branches/3.1/mondo/src/common/libmondo-fork.c

    r2704 r2937  
    9797 * - @c bkpinfo->manual_cd_tray
    9898 * - @c bkpinfo->backup_media_type
    99  * - @c bkpinfo->please_dont_eject_when_restoring
    10099 * @param basic_call The call to mkisofs. May contain tokens that will be resolved to actual data. The tokens are:
    101100 * - @c _ISO_ will become the ISO file (@p isofile)
  • branches/3.1/mondo/src/common/libmondo-mountlist.c

    r2816 r2937  
    840840            !strcmp(mountlist->el[items].device, "/sys") ||
    841841            !strcmp(mountlist->el[items].device, "sys") ||
     842            !strcmp(mountlist->el[items].device, "/run") ||
     843            !strcmp(mountlist->el[items].device, "run") ||
    842844            !strcmp(mountlist->el[items].device, "/devpts") ||
    843845            !strcmp(mountlist->el[items].device, "devpts")
  • branches/3.1/mondo/src/common/libmondo-raid.c

    r2523 r2937  
    10221022    // get RAID level
    10231023    token = mr_strtok(string, delims, &lastpos);
     1024    // skip potential auto-read-only entry
     1025    if (!strcmp(token, "(auto-read-only)")) {
     1026        mr_free(token);
     1027        token = mr_strtok (string, delims, &lastpos);
     1028    }
    10241029    if (!strcmp(token, "multipath")) {
    10251030      raidlist->el[raidlist->entries].raid_level = -2;
  • branches/3.1/mondo/src/common/libmondo-stream.c

    r2704 r2937  
    737737
    738738    set_tape_block_size_with_mt(bkpinfo->internal_tape_block_size);
     739
     740    /* restore compression mode on */
     741    mr_asprintf(&command, "mt -f %s compression on",bkpinfo->media_device);
     742    res = run_program_and_log_output(command, 1);
     743    paranoid_free(command);
     744
    739745    return(res);
    740746}
  • branches/3.1/mondo/src/common/libmondo-tools.c

    r2850 r2937  
    378378    log_msg(1, "Post-param");
    379379    if (bkpinfo->backup_media_type == tape) {
     380        if (whine_if_not_found("mt") == 1) {
     381            fatal_error("Please install the mt command");
     382        }
    380383        log_msg(1, "Tape");
    381384        if (bkpinfo->media_device == NULL) {
     
    718721        /* purging a potential old tmpdir */
    719722        log_it("Purging old tmpdir %s", bkpinfo->tmpdir);
     723        chdir("/tmp");
    720724        mr_asprintf(tmp,"rm -Rf %s",bkpinfo->tmpdir);
    721725        mr_free(bkpinfo->tmpdir);
  • branches/3.1/mondo/src/common/libmondo-verify.c

    r2508 r2937  
    987987    verify_all_slices_on_CD(mountpoint);
    988988
    989     mr_asprintf(tmp1, "umount %s", mountpoint);
     989    mr_asprintf(tmp1, "umount -d %s", mountpoint);
    990990#ifdef __FreeBSD__
    991991    ret += system(tmp1);
     
    11181118#ifdef __FreeBSD__
    11191119    ret = 0;
    1120     mr_asprintf(command, "umount %s", mountpoint);
     1120    mr_asprintf(command, "umount -d %s", mountpoint);
    11211121    ret += system(command);
    11221122    ret += kick_vn(mddevice);
    11231123    if (ret) {
    11241124#else
    1125     mr_asprintf(command, "umount %s", mountpoint);
     1125    mr_asprintf(command, "umount -d %s", mountpoint);
    11261126    if (system(command)) {
    11271127#endif
     
    11361136
    11371137    if (!does_file_exist(fname)) {
    1138         mr_asprintf(command, "umount %s", bkpinfo->media_device);
     1138        mr_asprintf(command, "umount -d %s", bkpinfo->media_device);
    11391139        run_program_and_log_output(command, 2);
    11401140        mr_free(command);
  • branches/3.1/mondo/src/common/newt-specific.c

    r2874 r2937  
    262262char *tmp1 = NULL;
    263263
    264     mr_asprintf(tmp,"ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"", ps_options, str , ps_proc_id);
     264    mr_asprintf(tmp,"ps %s | grep \" %s \" | grep -v \"grep\" | awk '{print %s;}'", ps_options, str , ps_proc_id);
    265265    run_program_and_log_output(tmp, TRUE);
    266266    if (strlen(tmp) > 0) {
     
    320320        chdir("/");
    321321        if (g_selfmounted_isodir) {
    322             mr_asprintf(command, "umount %s", g_selfmounted_isodir);
     322            mr_asprintf(command, "umount -d %s", g_selfmounted_isodir);
    323323            run_program_and_log_output(command, 5);
    324324            mr_free(command);
     
    368368        char *command = NULL;
    369369
    370         chdir("/");
    371         run_program_and_log_output("umount " MNT_CDROM, FALSE);
     370        /*  Before removing dir, make sure we're out of them */
     371        chdir("/tmp");
     372        run_program_and_log_output("umount -d " MNT_CDROM, FALSE);
    372373        if (g_selfmounted_isodir) {
    373             mr_asprintf(command, "umount %s", g_selfmounted_isodir);
     374            mr_asprintf(command, "umount -d %s", g_selfmounted_isodir);
    374375            run_program_and_log_output(command, 1);
    375376            mr_free(command);
     
    382383            log_msg(8,"tempdir is %s",bkpinfo->tmpdir);
    383384            if (strstr(bkpinfo->tmpdir ,"mondo.tmp.") != NULL) {
    384                 log_msg(8,"erasing tempdir");
     385                log_msg(8,"erasing tempdir %s",bkpinfo->tmpdir);
    385386                mr_asprintf(command, "rm -Rf %s", bkpinfo->tmpdir);
    386387                system(command);
     
    391392            log_msg(8,"scratchdir is %s", bkpinfo->scratchdir);
    392393            if (strstr(bkpinfo->scratchdir ,"mondo.scratch.") != NULL) {
    393                 log_msg(8,"erasing scratchdir");
     394                log_msg(8,"erasing scratchdir %s",bkpinfo->scratchdir);
    394395                mr_asprintf(command, "rm -Rf %s", bkpinfo->scratchdir);
    395396                system(command);
     
    579580            newtCenteredWindow(40, 7, title);
    580581            g_isoform_main = newtForm(NULL, NULL, 0);
    581             g_isoform_timeline = newtLabel(1, 5, "This is the timeline");
    582             g_isoform_pcline = newtLabel(1, 6, "This is the pcline");
     582            g_isoform_timeline = newtLabel(1, 5, "                    ");
     583            g_isoform_pcline = newtLabel(1, 6, "                  ");
    583584            newtFormAddComponents(g_isoform_main, g_isoform_timeline,
    584585                                  g_isoform_pcline, g_isoform_header,
    585586                                  g_isoform_scale, NULL);
     587            newtDrawForm(g_isoform_main);
    586588            newtRefresh();
    587589        }
     
    647649            g_scale = newtScale(3, 6, 54, (long long)g_maximum_progress);
    648650            g_progressForm = newtForm(NULL, NULL, 0);
    649             g_percentline = newtLabel(10, 9, "This is the percentline");
    650             g_timeline = newtLabel(10, 8, "This is the timeline");
     651            g_percentline = newtLabel(10, 9, "                       ");
     652            g_timeline = newtLabel(10, 8, "                    ");
    651653            newtFormAddComponents(g_progressForm, g_percentline, g_timeline, g_scale, g_blurb1, g_blurb3, g_blurb2, NULL);
    652654            newtPushHelpLine(b1c);
     655            newtDrawForm(g_progressForm);
    653656            newtRefresh();
    654657        }
     
    969972        }
    970973        if (!g_text_mode) {
     974            newtDrawForm(g_isoform_main);
    971975            newtRefresh();
    972976        }
     
    11001104            mr_free(percentline_str);
    11011105
     1106            newtDrawForm(g_progressForm);
    11021107            newtRefresh();
    11031108        }
Note: See TracChangeset for help on using the changeset viewer.