Changeset 2648 in MondoRescue for devel/mrmini/sbin/mrmindi


Ignore:
Timestamp:
Jun 13, 2010, 12:36:32 PM (14 years ago)
Author:
Bruno Cornec
Message:

r3873@localhost: bruno | 2010-06-10 12:28:15 +0200

  • Big renaming in progress mindi => mrmini
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/mrmini/sbin/mrmindi

    r2646 r2648  
    11#!/usr/bin/perl -w
    22#
    3 # Mindi main application
     3# mrmini main application
    44# Mini-distribution maker for the MondoRescue project
    55#
     
    3737=head1 NAME
    3838
    39 Mindi - Tool to create a boot environment from a distribution
     39mrmini - Tool to create a boot environment from a distribution
    4040
    4141=head1 DESCRIPTION
    4242
    43 B<mindi> creates a bootable ISO/USB image using files from the system it runs on. B<mindi> will try hard to reproduce the environment of its host system including loaded modules to ensure that the system can be booted properly from the created rescue media. B<mindi> is used by monodarchive(8) to produce the required USB/ISO images but can also be used stand-alone.
    44 
    45 For stand-alone usage, B<mindi> may be called without any parameters or switches. It will then interactively ask the user for all information required to create a set of boot/root media. Options on the command line or a configuration file can also be used to alter the way B<mindi> is working
    46 
    47 The probably more frequent way of calling B<mindi> is non-interactively from mondoarchive(8) using a dedicated configuration file.
     43B<mrmini> creates a bootable ISO/USB image using files from the system it runs on. B<mrmini> will try hard to reproduce the environment of its host system including loaded modules to ensure that the system can be booted properly from the created rescue media. B<mrmini> is used by monodarchive(8) to produce the required USB/ISO images but can also be used stand-alone.
     44
     45For stand-alone usage, B<mrmini> may be called without any parameters or switches. It will then interactively ask the user for all information required to create a set of boot/root media. Options on the command line or a configuration file can also be used to alter the way B<mrmini> is working
     46
     47The probably more frequent way of calling B<mrmini> is non-interactively from mondoarchive(8) using a dedicated configuration file.
    4848
    4949=head1 SYNOPSIS
    5050
    51 mindi [-v]|[-q]|[-h]|[--man]
     51mrmini [-v]|[-q]|[-h]|[--man]
    5252
    5353=head1 OPTIONS
     
    122122=item B<-V|--version>
    123123
    124 Display mindi version and exit
     124Display mrmini version and exit
    125125
    126126=cut
     
    159159
    160160 # mrcachedir points to the directory where the tool will store generated content
    161  # If not defined, mrcachedir is under /var/cache/mindi
    162  mrcachedir mindi = /var/cache/mindi
    163 
    164  Also look at man mindi.conf
     161 # If not defined, mrcachedir is under /var/cache/mrmini
     162 mrcachedir mrmini = /var/cache/mrmini
     163
     164 Also look at man mrmini.conf
    165165 
    166166=head1 AUTHORS
     
    170170=head1 COPYRIGHT
    171171
    172 Mindi is distributed under the GPL v2.0 license
     172mrmini is distributed under the GPL v2.0 license
    173173described in the file C<COPYING> included with the distribution.
    174174
     
    179179# Initialize the syntax string
    180180
    181 pb_syntax_init("mindi Version PBVER-rPBREV\n");
     181pb_syntax_init("mrmini Version PBVER-rPBREV\n");
    182182pb_display_init("text","");
    183183
     
    215215# Global variables
    216216#
    217 my $MINDI_VERSION = "PBVER-rPBREV";
    218 my $MINDI_PREFIX = "XXX";
    219 my $MINDI_CONF = "YYY";
    220 my $MINDI_LIB = "LLL";
    221 my $MINDI_SBIN = "$MINDI_PREFIX/sbin";
    222 my $MINDI_FDISK = "$MINDI_SBIN/parted2fdik";
    223 my $MINDI_DEPLIST = "$MINDI_CONF/deplist.d";
     217my $MRMINI_VERSION = "PBVER-rPBREV";
     218my $MRMINI_PREFIX = "XXX";
     219my $MRMINI_CONF = "YYY";
     220my $MRMINI_LIB = "LLL";
     221my $MRMINI_SBIN = "$MRMINI_PREFIX/sbin";
     222my $MRMINI_FDISK = "$MRMINI_SBIN/parted2fdik";
     223my $MRMINI_DEPLIST = "$MRMINI_CONF/deplist.d";
    224224# Better ?
    225225my $ARCH = `uname -m`;
     
    233233#
    234234# Conf files Management
    235 # the $MINDI_CONF/mondorescue.conf.dist is delivered as part of the project and
     235# the $MRMINI_CONF/mondorescue.conf.dist is delivered as part of the project and
    236236# its checksum is verified as we need good default values that we can trust
    237237#
    238 open(MD5,"$MINDI_CONF/mondorescue.conf.dist.md5") || die "Unable to read mandatory $MINDI_CONF/mondorescue.conf.dist.md5: $!";
     238open(MD5,"$MRMINI_CONF/mondorescue.conf.dist.md5") || die "Unable to read mandatory $MRMINI_CONF/mondorescue.conf.dist.md5: $!";
    239239my $omd5 = <MD5>;
    240240chop($omd5);
    241241close(MD5);
    242 open(CONF,"$MINDI_CONF/mondorescue.conf.dist") || die "Unable to read mandatory $MINDI_CONF/mondorescue.conf.dist: $!";
     242open(CONF,"$MRMINI_CONF/mondorescue.conf.dist") || die "Unable to read mandatory $MRMINI_CONF/mondorescue.conf.dist: $!";
    243243my $md5 = Digest::MD5->new;
    244244binmode(CONF);
    245245$md5->addfile(CONF);
    246 die "Invalid MD5 found sum for $MINDI_CONF/mondorescue.conf.dist: $md5->hexdigest" if ($omd5 ne $md5->hexdigest);
     246die "Invalid MD5 found sum for $MRMINI_CONF/mondorescue.conf.dist: $md5->hexdigest" if ($omd5 ne $md5->hexdigest);
    247247close(CONF);
    248248
    249249# Adds conf files in order
    250 pb_conf_add("$ENV{'HOME'}/.mondorescuerc","$MINDI_CONF/mondorescue.conf","$MINDI_CONF/mondorescue.conf.dist");
     250pb_conf_add("$ENV{'HOME'}/.mondorescuerc","$MRMINI_CONF/mondorescue.conf","$MRMINI_CONF/mondorescue.conf.dist");
    251251
    252252#
    253253# Configuration parameters
    254254#
    255 $ENV{'PBPROJ'} = "mindi";
     255$ENV{'PBPROJ'} = "mrmini";
    256256my ($mr_boot_size,$mr_boot_cd,$mr_boot_usb,$mr_boot_tape,$mr_kernel,$mr_fstab) =  pb_conf_get("mr_boot_size","mr_boot_cd","mr_boot_usb","mr_boot_tape","mr_kernel","mr_fstab");
    257257my ($mr_tape_mods,$mr_scsi_mods,$mr_ide_mods,$mr_pcmcia_mods,$mr_usb_mods,$mr_net_mods,$mr_cdrom_mods,$mr_deny_mods,$mr_force_mods) =  pb_conf_get("mr_tape_mods","mr_scsi_mods","mr_ide_mods","mr_pcmcia_mods","mr_usb_mods","mr_net_mods","mr_cdrom_mods","mr_extra_mods","mr_deny_mods","mr_force_mods");
     
    271271pb_log_init($pbdebug, $pbLOG);
    272272
    273 pb_log(0,"mindi start date: $mr_date");
     273pb_log(0,"mrmini start date: $mr_date");
    274274pb_log(0,"-------------------------------------");
    275 pb_log(0,"mindi v$MINDI_VERSION");
     275pb_log(0,"mrmini v$MRMINI_VERSION");
    276276pb_log(0,"$ARCH architecture detected");
    277 pb_log(0,"mindi called with the following arguments: ".join(" ",@ARGV));
     277pb_log(0,"mrmini called with the following arguments: ".join(" ",@ARGV));
    278278pb_log(0,"-------------------------------------");
    279279pb_log(0,"MONDO_CACHE: $ENV{'MONDO_CACHE'}") if (defined $ENV{'MONDO_CACHE'});
    280 pb_log(0,"MINDI_LIB: $MINDI_LIB");
    281 pb_log(0,"MINDI_CONF: $MINDI_CONF");
    282 pb_log(0,"MINDI_SBIN: $MINDI_SBIN");
     280pb_log(0,"MRMINI_LIB: $MRMINI_LIB");
     281pb_log(0,"MRMINI_CONF: $MRMINI_CONF");
     282pb_log(0,"MRMINI_SBIN: $MRMINI_SBIN");
    283283if (-r "$ENV{'HOME'}/.mondorescuerc") {
    284284    pb_log(0,"-------------------------------------");
     
    286286    pb_display_file("$ENV{'HOME'}/.mondorescuerc");
    287287}
    288 if (-r "$MINDI_CONF/mondorescue.conf") {
     288if (-r "$MRMINI_CONF/mondorescue.conf") {
    289289    pb_log(0,"-------------------------------------");
    290     pb_log(0,"Conf file $MINDI_CONF/mondorescue.conf");
    291     pb_display_file("$MINDI_CONF/mondorescue.conf");
     290    pb_log(0,"Conf file $MRMINI_CONF/mondorescue.conf");
     291    pb_display_file("$MRMINI_CONF/mondorescue.conf");
    292292}
    293293pb_log(0,"-------------------------------------");
Note: See TracChangeset for help on using the changeset viewer.