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.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 8c8fa4234..1abba61e4 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -243,8 +243,13 @@ sub set_permissions {
or die "Could not start chmod!";
}
+sub release_file {
+ my ($o_dir) = @_;
+ find { -r "$o_dir$_" } map { "/etc/$_" } 'mandrakelinux-release', 'mandrake-release', 'release', 'redhat-release';
+}
+
sub mandrake_release() {
- chomp_(cat_("/etc/mandrakelinux-release"));
+ chomp_(cat_(release_file()));
}
sub require_root_capability() {