aboutsummaryrefslogtreecommitdiffstats
path: root/del-syslog
diff options
context:
space:
mode:
authorDexter Morgan <dmorgan@mageia.org>2011-10-27 22:47:46 +0000
committerDexter Morgan <dmorgan@mageia.org>2011-10-27 22:47:46 +0000
commitc64fa938609c6bee9dd02adc1a37df89a9ebd116 (patch)
tree20da84dbd8cc32fb518e4bf777359664dba63a88 /del-syslog
parentb1c56622b1c4a3e390de269e8c28af133f2472c9 (diff)
downloadrpm-helper-c64fa938609c6bee9dd02adc1a37df89a9ebd116.tar
rpm-helper-c64fa938609c6bee9dd02adc1a37df89a9ebd116.tar.gz
rpm-helper-c64fa938609c6bee9dd02adc1a37df89a9ebd116.tar.bz2
rpm-helper-c64fa938609c6bee9dd02adc1a37df89a9ebd116.tar.xz
rpm-helper-c64fa938609c6bee9dd02adc1a37df89a9ebd116.zip
Add systemd support ( mdv )
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);