Changeset 2650 in MondoRescue for devel/mrmini


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

r3875@localhost: bruno | 2010-06-12 12:31:38 +0200

  • Review completely the installation process for mrmini, and first packages buildable
Location:
devel/mrmini
Files:
1 deleted
3 moved

Legend:

Unmodified
Added
Removed
  • devel/mrmini/sbin/mrmini

    r2648 r2650  
    5757# Handle options
    5858#
     59
     60=pod
     61=over 4
     62=item B<-v|--verbose>
     63
     64Print a brief help message and exits.
     65
     66=item B<-q|--quiet>
     67
     68Do not print any output.
     69
     70=item B<-h|--help>
     71
     72Print a brief help message and exits.
     73
     74=item B<--man>
     75
     76Prints the manual page and exits.
     77
     78=item B<-i|--iso iso_image>
     79
     80Name of the ISO image you want to created.
     81
     82=item B<-u|--usb usb_device>
     83
     84Name of the USB device on which you want to created your image.
     85
     86=item B<-t|--tape tape_device>
     87
     88Name of the Tape device on which you want to created your image.
     89
     90=item B<-o|--obdr>
     91
     92Activate OBDR mode for tape (Bootable tape devices)
     93
     94=item B<-V|--version>
     95
     96Display mrmini version and exit
     97
     98=item B<-f|--force>
     99
     100Force usage of defaults parameters or values without asking questions
     101
     102=item B<-p|--printvars variable>
     103
     104Prints the value of the variable passed as parameter
     105
     106=cut
    59107GetOptions(
    60 
    61 =over 4
    62 
    63 =cut
    64108        "verbose|v+" => \$opts{'v'},
    65 
    66 =item B<-v|--verbose>
    67 
    68 Print a brief help message and exits.
    69 
    70 =cut
    71109        "quiet|q" => \$opts{'q'},
    72 
    73 =item B<-q|--quiet>
    74 
    75 Do not print any output.
    76 
    77 =cut
    78110        "help|?|h" => \$opts{'h'},
    79 
    80 =item B<-h|--help>
    81 
    82 Print a brief help message and exits.
    83 
    84 =cut
    85111        "man" => \$opts{'man'},
    86 
    87 =item B<--man>
    88 
    89 Prints the manual page and exits.
    90 
    91 =cut
    92112        "iso|i=s" => \$opts{'i'},
    93 
    94 =item B<-i|--iso iso_image>
    95 
    96 Name of the ISO image you want to created.
    97 
    98 =cut
    99113        "usb|u=s" => \$opts{'u'},
    100 
    101 =item B<-u|--usb usb_device>
    102 
    103 Name of the USB device on which you want to created your image.
    104 
    105 =cut
    106114        "tape|t=s" => \$opts{'t'},
    107 
    108 =item B<-t|--tape tape_device>
    109 
    110 Name of the Tape device on which you want to created your image.
    111 
    112 =cut
    113115        "obdr|o" => \$opts{'o'},
    114 
    115 =item B<-o|--obdr>
    116 
    117 Activate OBDR mode for tape (Bootable tape devices)
    118 
    119 =cut
    120116        "version|V" => \$opts{'V'},
    121 
    122 =item B<-V|--version>
    123 
    124 Display mrmini version and exit
    125 
    126 =cut
    127117        "force|f" => \$opts{'f'},
    128 
    129 =item B<-f|--force>
    130 
    131 Force usage of defaults parameters or values without asking questions
    132 
    133 =cut
    134118        "printvar|p=s" => \$opts{'p'},
    135 
    136 =item B<-p|--printvars variable>
    137 
    138 Prints the value of the variable passed as parameter
    139 
    140 =cut
    141119        "log-files|l=s" => \$opts{'l'},
    142120) || pb_syntax(-1,0);
    143121
     122=pod
    144123=back
    145124
     
    215194# Global variables
    216195#
     196my ($MRMINI_PREFIX,$MRMINI_CONF,$MRMINI_LIB) = mr_setup_var();
    217197my $MRMINI_VERSION = "PBVER-rPBREV";
    218 my $MRMINI_PREFIX = "XXX";
    219 my $MRMINI_CONF = "YYY";
    220 my $MRMINI_LIB = "LLL";
    221198my $MRMINI_SBIN = "$MRMINI_PREFIX/sbin";
    222199my $MRMINI_FDISK = "$MRMINI_SBIN/parted2fdik";
     
    231208pb_temp_init();
    232209
    233 #
    234 # Conf files Management
    235 # the $MRMINI_CONF/mondorescue.conf.dist is delivered as part of the project and
    236 # its checksum is verified as we need good default values that we can trust
    237 #
    238 open(MD5,"$MRMINI_CONF/mondorescue.conf.dist.md5") || die "Unable to read mandatory $MRMINI_CONF/mondorescue.conf.dist.md5: $!";
    239 my $omd5 = <MD5>;
    240 chop($omd5);
    241 close(MD5);
    242 open(CONF,"$MRMINI_CONF/mondorescue.conf.dist") || die "Unable to read mandatory $MRMINI_CONF/mondorescue.conf.dist: $!";
    243 my $md5 = Digest::MD5->new;
    244 binmode(CONF);
    245 $md5->addfile(CONF);
    246 die "Invalid MD5 found sum for $MRMINI_CONF/mondorescue.conf.dist: $md5->hexdigest" if ($omd5 ne $md5->hexdigest);
    247 close(CONF);
    248 
    249210# Adds conf files in order
    250 pb_conf_add("$ENV{'HOME'}/.mondorescuerc","$MRMINI_CONF/mondorescue.conf","$MRMINI_CONF/mondorescue.conf.dist");
     211pb_conf_add("$ENV{'HOME'}/.mondorescuerc","$MRMINI_CONF/mondorescue.conf");
    251212
    252213#
Note: See TracChangeset for help on using the changeset viewer.