summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index dfa9f139e..5daf17af0 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -294,6 +294,14 @@ sub set_permissions {
chmod(oct($perms), $file) or die "chmod of file $file failed: $!\n";
}
+sub parse_release_file {
+ my ($prefix, $f, $part) = @_;
+ chomp(my $s = cat_("$prefix$f"));
+ my $arch = $s =~ s/\s+for\s+(\S+)// && $1;
+ log::l("find_root_parts found $part->{device}: $s for $arch" . ($f !~ m!/etc/! ? " in special release file $f" : ''));
+ { release => $s, release_file => $f, part => $part, arch => $arch };
+}
+
sub release_file {
my ($o_dir) = @_;
my @names = ('mandrakelinux-release', 'mandrake-release', 'conectiva-release', 'release', 'redhat-release', 'fedora-release');