diff options
author | Guillaume Rousse <guillomovitch@mandriva.org> | 2010-02-04 19:49:56 +0000 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@mandriva.org> | 2010-02-04 19:49:56 +0000 |
commit | 162b766c589b4c2c4dabcd39a9142f0dd0cd6988 (patch) | |
tree | 68b90d17bcd3e671eb12e2608a5817618eeb5002 /add-syslog | |
parent | 0a5f229aaeb77826b4daa8c7d51a7212aae527b7 (diff) | |
download | rpm-helper-162b766c589b4c2c4dabcd39a9142f0dd0cd6988.tar rpm-helper-162b766c589b4c2c4dabcd39a9142f0dd0cd6988.tar.gz rpm-helper-162b766c589b4c2c4dabcd39a9142f0dd0cd6988.tar.bz2 rpm-helper-162b766c589b4c2c4dabcd39a9142f0dd0cd6988.tar.xz rpm-helper-162b766c589b4c2c4dabcd39a9142f0dd0cd6988.zip |
only add configuration entry if target syslog implementation is installed
Diffstat (limited to 'add-syslog')
-rwxr-xr-x | add-syslog | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -37,7 +37,6 @@ EOF exit(0) if $number == 2; # check arguments - die "invalid facility '$facility'" if $facility && !$facilities{$facility}; die "invalid min priority '$min'" if $min && ! defined $priorities{$min}; @@ -52,10 +51,13 @@ EOF my $release = $1; close($fh); + # add an entry to default syslog implementation, if installed if (version->parse($release) < version->parse("2010.1")) { - add_sysklogd_entry($package, $source, $dest, $facility, $min, $max); + add_sysklogd_entry($package, $source, $dest, $facility, $min, $max) + if -f '/etc/init.d/syslog'; } else { - add_rsyslog_entry($package, $source, $dest, $facility, $min, $max); + add_rsyslog_entry($package, $source, $dest, $facility, $min, $max) + if -f '/etc/init.d/rsyslog'; } } |