diff options
author | Guillaume Rousse <guillomovitch@mandriva.org> | 2010-02-03 22:51:44 +0000 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@mandriva.org> | 2010-02-03 22:51:44 +0000 |
commit | 368581c1fbc743a205316794bba1e9db2054d25f (patch) | |
tree | 97f3f25a8e9ea48608add829b421555ae1314fd1 /add-syslog | |
parent | c3a053c8b32be76feb9929e5875c835cd6a6e45f (diff) | |
download | rpm-helper-368581c1fbc743a205316794bba1e9db2054d25f.tar rpm-helper-368581c1fbc743a205316794bba1e9db2054d25f.tar.gz rpm-helper-368581c1fbc743a205316794bba1e9db2054d25f.tar.bz2 rpm-helper-368581c1fbc743a205316794bba1e9db2054d25f.tar.xz rpm-helper-368581c1fbc743a205316794bba1e9db2054d25f.zip |
rsyslog can use configuration statements for external sources, instead of command-line argument, allowing to just reload it
Diffstat (limited to 'add-syslog')
-rwxr-xr-x | add-syslog | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -89,10 +89,6 @@ sub add_sysklogd_entry { sub add_rsyslog_entry { my ($package, $source, $dest, $facility, $min, $max) = @_; - # ensure source is configured - add_new_source($source, '/etc/sysconfig/rsyslog') - if $source ne '/dev/log'; - # compute selector my $selector = get_selector($facility, $min, $max); @@ -100,11 +96,12 @@ sub add_rsyslog_entry { open(my $out, '>', "/etc/rsyslog.d/$package.conf") or die "Can't open /etc/rsyslog.d/$package.conf for writing: $!"; print $out "# Automatically added by $package installation\n"; + print $out "\$AddUnixListenSocket $source\n" if $source ne '/dev/log'; print $out "$selector\t-$dest\n"; close($out); # relaunch rsyslog - system('service rsyslog condrestart 2>&1 >/dev/null'); + system('service rsyslog condreload 2>&1 >/dev/null'); } sub add_new_source { |