diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-04-21 15:17:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-04-21 15:17:42 +0000 |
commit | a2c392a9ab83bb9031fb11f99f0101f1f2d9f140 (patch) | |
tree | 1bc35118fda9f112ee69eaeb980759f545691f19 /perl-install/common.pm | |
parent | e18ed6c2b514483604e2ca6bd35923a0371b86ab (diff) | |
download | drakx-backup-do-not-use-a2c392a9ab83bb9031fb11f99f0101f1f2d9f140.tar drakx-backup-do-not-use-a2c392a9ab83bb9031fb11f99f0101f1f2d9f140.tar.gz drakx-backup-do-not-use-a2c392a9ab83bb9031fb11f99f0101f1f2d9f140.tar.bz2 drakx-backup-do-not-use-a2c392a9ab83bb9031fb11f99f0101f1f2d9f140.tar.xz drakx-backup-do-not-use-a2c392a9ab83bb9031fb11f99f0101f1f2d9f140.zip |
create common::release_file() and use it
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 7 |
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() { |