aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/ifcfg-bond-slave
stat options
Period:
Authors:

Commits per author per week (path 'doc/examples/ifcfg-bond-slave')

AuthorW18 2026W19 2026W20 2026W21 2026Total
Total00000
f='#n12'>12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
package gurpmi;

#- Copyright (C) 2005 MandrakeSoft SA
#- Copyright (C) 2005 Mandriva SA

#- This is needed because text printed by Gtk2 will always be encoded
#- in UTF-8; we first check if LC_ALL is defined, because if it is,
#- changing only LC_COLLATE will have no effect.
use POSIX qw(setlocale LC_ALL LC_COLLATE);
use locale;
my $collation_locale = $ENV{LC_ALL};
if ($collation_locale) {
    $collation_locale =~ /UTF-8/ or setlocale(LC_ALL, "$collation_locale.UTF-8");
} else {
    $collation_locale = setlocale(LC_COLLATE);
    $collation_locale =~ /UTF-8/ or setlocale(LC_COLLATE, "$collation_locale.UTF-8");
}

use urpm;
use strict;

use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(fatal but quit add_button_box new_label N);
(our $VERSION) = q$Id$ =~ /(\d+\.\d+)/;

sub usage () {
    print <<USAGE;
gurpmi version $urpm::VERSION
Usage :
    gurpmi <rpm> [ <rpm>... ]
Options :
    --no-verify-rpm
USAGE
    exit 0;
}

#- fatal gurpmi initialisation error (*not* fatal urpmi errors)
sub fatal { my $s = $_[0]; print STDERR "$s\n"; exit 1 }

#- Parse command line
#- puts options in %gurpmi::options
#- puts bare names (not rpm filenames) in @gurpmi::names
sub parse_command_line {
    my @all_rpms;
    our %options;
    our @names;
    # Expand *.urpmi arguments
    my @ARGV_expanded;
    foreach my $a (@ARGV) {
	if ($a =~ /\.urpmi$/) {
	    open my $fh, '<', $a or do { warn "Can't open $a: $!\n"; next };
	    push @ARGV_expanded, map { chomp; $_ } <$fh>;
	    close $fh;
	} else {
	    push @ARGV_expanded, $a;
	}
    }
    foreach (@ARGV_expanded) {
	if (/^-/) {
	    if ($_ eq '--no-verify-rpm') {
		$options{'no-verify-rpm'} = 1;
		next;
	    }
	    /^--?[hv?]/ and usage();
	    fatal(N("Unknown option %s", $_));
	}