aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2007-09-06 13:04:05 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2007-09-06 13:04:05 +0000
commit6ae2fc41d6f714229074d3721072cab802da722b (patch)
treecadfd758544ab3bce80660b2f8685819bd5556cf
parente29bfa88ace99b08bfe8e341649a3161c371e31f (diff)
downloadrpm-helper-6ae2fc41d6f714229074d3721072cab802da722b.tar
rpm-helper-6ae2fc41d6f714229074d3721072cab802da722b.tar.gz
rpm-helper-6ae2fc41d6f714229074d3721072cab802da722b.tar.bz2
rpm-helper-6ae2fc41d6f714229074d3721072cab802da722b.tar.xz
rpm-helper-6ae2fc41d6f714229074d3721072cab802da722b.zip
more readable scenario (installation/upgrade/removal) checking
-rwxr-xr-xadd-syslog4
-rwxr-xr-xdel-syslog5
2 files changed, 7 insertions, 2 deletions
diff --git a/add-syslog b/add-syslog
index 092d50b..1effdce 100755
--- a/add-syslog
+++ b/add-syslog
@@ -23,8 +23,8 @@ Available options:
EOF
my ($package, $number, $dest) = @ARGV;
-# don't do anything in upgrade
-exit(0) if $number != 1;
+# don't do anything for upgrade
+exit(0) if $number == 2;
# check arguments
my @facilities = qw/auth authpriv cron daemon \
diff --git a/del-syslog b/del-syslog
index e344a44..185b6ae 100755
--- a/del-syslog
+++ b/del-syslog
@@ -1,10 +1,15 @@
#!/usr/bin/perl
# rpm helper scriptlet to remove a syslog entry (sysklogd and syslog-ng)
# $Id$
+use strict;
die <<EOF if @ARGV < 2;
usage: $0 <pkg> <nb>
EOF
+my ($package, $number) = @ARGV;
+
+# don't do anything for upgrade
+exit(0) if $number == 1;
if (-f '/etc/syslog.conf') {
del_syslog_entry($package, '/etc/syslog.conf');