aboutsummaryrefslogtreecommitdiffstats
path: root/del-syslog
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mageia.org>2012-03-08 19:16:26 +0000
committerGuillaume Rousse <guillomovitch@mageia.org>2012-03-08 19:16:26 +0000
commitd8f6c7268e00b808d9d59c0624aee83ab6f5aab0 (patch)
treeaac431a3d17d6bb12413cb9dc96d3b82384d870a /del-syslog
parent332c90458b9c88f04291a84fb62135d7f058ac01 (diff)
downloadrpm-helper-d8f6c7268e00b808d9d59c0624aee83ab6f5aab0.tar
rpm-helper-d8f6c7268e00b808d9d59c0624aee83ab6f5aab0.tar.gz
rpm-helper-d8f6c7268e00b808d9d59c0624aee83ab6f5aab0.tar.bz2
rpm-helper-d8f6c7268e00b808d9d59c0624aee83ab6f5aab0.tar.xz
rpm-helper-d8f6c7268e00b808d9d59c0624aee83ab6f5aab0.zip
actually, we don't care about sysklogd at all anymore
Diffstat (limited to 'del-syslog')
-rwxr-xr-xdel-syslog36
1 files changed, 1 insertions, 35 deletions
diff --git a/del-syslog b/del-syslog
index 456ffe0..c5c9725 100755
--- a/del-syslog
+++ b/del-syslog
@@ -14,41 +14,7 @@ EOF
# don't do anything for upgrade
exit(0) if $number == 1;
- my $release_file = '/etc/release';
- open(my $fh, '<', $release_file)
- or die "can't open $release_file: $!";
- my $line = <$fh>;
- $line =~ /^Mageia release (\d\d\d\d\.\d)/;
- my $release = $1;
- close($fh);
-
- del_rsyslog_entry($package);
-}
-
-sub del_sysklogd_entry {
- my ($package) = @_;
-
- my $file = "/etc/syslog.conf";
-
- my $content;
- open(my $in, '<', $file)
- or die "Can't open $file for reading: $!";
- while (my $line = <$in>) {
- if ($line =~ /^# BEGIN: Automatically added by $package installation$/) {
- while ($line = <$in>) {
- last if $line =~ /^# END$/;
- }
- } else {
- $content .= $line;
- }
- }
-
- open(my $out, '>', $file)
- or die "Can't open $file for writing: $!";
- print $out $content;
- close($out);
-
- system('service syslog condrestart 2>&1 >/dev/null');
+ del_rsyslog_entry($package);
}
sub del_rsyslog_entry {