Changeset 20 for trunk/mondo/mondo


Ignore:
Timestamp:
Sep 9, 2005, 7:30:28 PM (14 years ago)
Author:
bcornec
Message:

-p option added

Location:
trunk/mondo/mondo
Files:
7 edited

Legend:

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

    r1 r20  
    12231223 * - @c backup_media_type
    12241224 * - @c cdrw_speed
     1225 * - @c prefix
    12251226 * - @c isodir
    12261227 * - @c media_device
     
    12801281    }
    12811282
    1282   sprintf (command, "rm -f %s/[1-9]*.iso", bkpinfo->isodir);
     1283  sprintf (command, "rm -f %s/%s-[1-9]*.iso", bkpinfo->prefix, bkpinfo->isodir);
    12831284  paranoid_system (command);
    12841285  wipe_archives (bkpinfo->scratchdir);
     
    19111912// and add ' .' at end
    19121913#ifdef __IA64__
    1913               log_msg(1, "IA64 --> lilo");
     1914              log_msg(1, "IA64 --> elilo");
    19141915              res =
    19151916                eval_call_to_make_ISO (bkpinfo,
     
    35363537
    35373538/**
    3538  * Write an ISO image to <tt>[bkpinfo->isodir]/[g_current_media_number].iso</tt>.
     3539 * Write an ISO image to <tt>[bkpinfo->isodir]/bkpinfo->prefix-[g_current_media_number].iso</tt>.
    35393540 * @param bkpinfo The backup information structure. Fields used:
    35403541 * - @c backup_media_type
     3542 * - @c prefix
    35413543 * - @c isodir
    35423544 * - @c manual_cd_tray
     
    36233625      log_to_screen (tmp);
    36243626    }
    3625   sprintf (isofile, "%s/%s/%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir,
    3626            g_current_media_number);
     3627  sprintf (isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir,
     3628           bkpinfo->prefix, g_current_media_number);
    36273629  for (that_one_was_ok = FALSE; !that_one_was_ok;)
    36283630    {
  • trunk/mondo/mondo/common/libmondo-devices.c

    r9 r20  
    16621662 * @param bkpinfo The backup information structure. Fields used:
    16631663 * - @c bkpinfo->backup_media_type
     1664 * - @c bkpinfo->prefix
    16641665 * - @c bkpinfo->isodir
    16651666 * - @c bkpinfo->media_device
     
    17011702      if (is_this_device_mounted(MNT_CDROM)) { run_program_and_log_output("umount "MNT_CDROM, 5); }
    17021703      system("mkdir -p /tmp/isodir &> /dev/null");
    1703       sprintf(tmp, "%s/%s/%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, cd_number_i_want);
     1704      sprintf(tmp, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, cd_number_i_want);
    17041705      if (!does_file_exist(tmp))
    17051706        {
    1706       sprintf(tmp, "/tmp/isodir/%s/%d.iso", bkpinfo->nfs_remote_dir, cd_number_i_want);
     1707      sprintf(tmp, "/tmp/isodir/%s/%s-%d.iso", bkpinfo->nfs_remote_dir, bkpinfo->prefix, cd_number_i_want);
    17071708      if (does_file_exist(tmp))
    17081709        {
     
    20482049                     { log_to_screen ("User has chosen not to backup the PC"); finish(1); }
    20492050                 for(i=0; i<=MAX_NOOF_MEDIA; i++) { bkpinfo->media_size[i] = atoi (sz_size); }
     2051             if (!popup_and_get_string("Prefix.", "Please enter the prefix that will be prepended to your ISO filename.  Example: machine1 to obtain machine1-[1-9]*.iso files", bkpinfo->prefix, MAX_STR_LEN/4))
     2052          { log_to_screen("User has chosen not to backup the PC"); finish(1); }
    20502053             } else {
    20512054                 for (i=0;i<=MAX_NOOF_MEDIA; i++) { bkpinfo->media_size[i] = 650;}
  • trunk/mondo/mondo/common/libmondo-tools.c

    r1 r20  
    572572 * - Used: @c bkpinfo->compression_level
    573573 * - Used: @c bkpinfo->include_paths
     574 * - Used: @c bkpinfo->prefix
    574575 * - Used: @c bkpinfo->isodir
    575576 * - Used: @c bkpinfo->manual_cd_tray
     
    983984  else
    984985    { strcpy (bkpinfo->isodir, "/root/images/mondo"); }
     986  strcpy (bkpinfo->prefix, "mondorescue");
    985987
    986988  bkpinfo->scratchdir[0] = '\0';
  • trunk/mondo/mondo/common/libmondo-verify.c

    r1 r20  
    966966 * @param bkpinfo The backup information structure. Fields used:
    967967 * - @c bkpinfo->isodir
     968 * - @c bkpinfo->prefix
    968969 * - @c bkpinfo->manual_cd_tray
    969970 * - @c bkpinfo->media_device
     
    10031004
    10041005  sprintf (mountpoint, "%s/cdrom", bkpinfo->tmpdir);
    1005   sprintf (fname, "%s/%s/%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir,
    1006       g_current_media_number);
     1006  sprintf (fname, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->prefix,
     1007          bkpinfo->nfs_remote_dir, g_current_media_number);
    10071008
    10081009  mkdir (mountpoint, 1777);
  • trunk/mondo/mondo/common/mondostructures.h

    r1 r20  
    443443   */
    444444  char isodir[MAX_STR_LEN/4];
     445
     446/**
     447   * The prefix to put in front of media number
     448   * If backup_media_type is @b iso, then this is the prefix for the filename
     449   * If backup_media_type is anything else, this is ignored.
     450   */
     451  char prefix[MAX_STR_LEN/4];
    445452
    446453  /**
  • trunk/mondo/mondo/mondoarchive/mondo-cli.c

    r1 r20  
    697697          log_to_screen(tmp);
    698698    }
     699    }
     700if (flag_set['p'])
     701    {
     702      strncpy (bkpinfo->prefix, flag_val['p'], MAX_STR_LEN/4);
    699703    }
    700704
     
    945949  while ((opt =
    946950      getopt (argc, argv,
    947           "0123456789A:B:CDE:FHI:J:K:LNOP:QRS:T:VWb:c:d:ef:gik:l:mn:ors:tuw:x:")) !=
     951          "0123456789A:B:CDE:FHI:J:K:LNOP:QRS:T:VWb:c:d:ef:gik:l:mn:op:rs:tuw:x:")) !=
    948952     -1)
    949953    {
  • trunk/mondo/mondo/mondoarchive/mondoarchive.8

    r1 r20  
    1 .TH mondoarchive 8 "June 2004" Linux MondoRescue
     1.TH mondoarchive 8 "September 2005" Linux MondoRescue
    22
    33.SH NAME
     
    7676write-once disks as backup media.
    7777.B Experimental.
     78
     79.TP
     80.BI "-p " prefix
     81Use
     82.B prefix
     83to generate the name of your ISO images.
     84By default, mondoarchive calls images mondorescue-1.iso, mondorescue-2.iso, ...
     85Using
     86.B -p machine
     87it will call your images machine-1.iso, machine-2.iso, ...
    7888
    7989.TP
Note: See TracChangeset for help on using the changeset viewer.