aboutsummaryrefslogtreecommitdiffstats
path: root/del-syslog
diff options
context:
space:
mode:
Diffstat (limited to 'del-syslog')
-rwxr-xr-xdel-syslog11
1 files changed, 6 insertions, 5 deletions
diff --git a/del-syslog b/del-syslog
index 577fb5d..5dea667 100755
--- a/del-syslog
+++ b/del-syslog
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# rpm helper scriptlet to remove a syslog entry (sysklogd and syslog-ng)
-# $Id: del-syslog 265808 2010-02-04 19:58:44Z guillomovitch $
+# $Id: del-syslog 271805 2011-01-25 14:57:43Z nanardon $
use strict;
main(@ARGV) unless caller();
@@ -14,14 +14,15 @@ EOF
# don't do anything for upgrade
exit(0) if $number == 1;
- open(my $fh, '<', '/etc/mandriva-release')
- or die "can't open /etc/mandriva-release: $!";
+ my $release_file = '/etc/release';
+ open(my $fh, '<', $release_file)
+ or die "can't open $release_file: $!";
my $line = <$fh>;
- $line =~ /^Mandriva Linux release (\d\d\d\d\.\d)/;
+ $line =~ /^Mageia release (\d\d\d\d\.\d)/;
my $release = $1;
close($fh);
- if (version->parse($release) < version->parse("2010.1")) {
+ if ($release && version->parse($release) < version->parse("2010.1")) {
del_sysklogd_entry($package);
} else {
del_rsyslog_entry($package);