#!/usr/bin/perl @ARGV == 1 && chdir $ARGV[0] or die "usage: devices.pl \n"; if ($>) { $sudo = "sudo"; $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; } foreach () { chomp; my ($typ, $maj, $min, @l) = split; foreach (@l) { my @l2 = do { if (my ($prefix, $ini, $end) = /(.*)(\d+)-(\d+)$/) { map { "$prefix$_" } $ini .. $end; } else { $_; } }; system("$sudo mknod $_ $typ $maj " . $min++) foreach @l2; } } __DATA__ c 5 1 console b 2 0 fd0-1 c 1 2 kmem b 7 0 loop0-15 c 1 1 mem c 1 3 null c 1 4 port b 1 1 ram b 1 0 ram0-19 b 1 0 ramdisk c 1 8 random b 11 0 scd0-7 c 0 0 stderr c 0 0 stdin c 0 0 stdout c 5 0 tty c 4 0 tty0-9 c 4 64 ttyS0-3 c 1 9 urandom c 1 5 zero b 3 0 hda hda1-16 b 3 64 hdb hdb1-16 b 22 0 hdc hdc1-16 b 22 64 hdd hdd1-16 b 33 0 hde hde1-16 b 33 64 hdf hdf1-16 b 34 0 hdg hdg1-16 b 34 64 hdh hdh1-16 b 8 0 sda sda1-15 sdb sdb1-15 sdc sdc1-15 sdd sdd1-15 sde sde1-15 sdf sdf1-15 sdg sdg1-15 sdh sdh1-15 b 9 0 md0-15 c 10 144 nvram c 9 0 st0-15 09.0'>distro/mdv2009.0 Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-01-22 16:38:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-01-22 16:38:44 +0000
commitb4813a6eca535efa65067be3697af854f0ee8f79 (patch)
tree3398b65545d63f9e470d2826966f8ceb8477390a /perl-install/pkgs.pm
parent53b5abee1210a87a0004573a9dd7d7e3dfbe05ea (diff)
downloaddrakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar
drakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar.gz
drakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar.bz2
drakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar.xz
drakx-b4813a6eca535efa65067be3697af854f0ee8f79.zip
(read_rpmsrate): if $packages is undef, ignore it. That way, read_rpmsrate
can be called standalone.
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index a8446990f..861cac35f 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -637,9 +637,12 @@ sub read_rpmsrate {
# has packages on same line
my ($rate) = grep { /^\d$/ } @m or die sprintf qq(missing rate for "%s" at line %d (flags are %s)\n), $data, $line_nb, join('&&', @m);
foreach (split ' ', $data) {
- #-log::l("rpmsrate: $_ = ", join(" && ", @m));
- my $p = packageByName($packages, $_) or log::l("unknown package $_"), next;
- $p->[$VALUES] = join("\t", $rate, grep { !/^\d$/ } @m);
+ if ($packages) {
+ my $p = packageByName($packages, $_) or next;
+ $p->[$VALUES] = join("\t", $rate, grep { !/^\d$/ } @m);
+ } else {
+ print "$_ = ", join(" && ", @m), "\n";
+ }
}
push @l, @l2;
} else {