Changeset 783 for server/fedora
- Timestamp:
- Aug 2, 2008, 5:17:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/fedora/config/etc/syslog-ng/d_zroot.pl
r770 r783 9 9 our $ZCLASS = "scripts-auto"; 10 10 our @USERS = qw/root logview/; 11 my $k5login; 12 open $k5login, '/root/.k5login'; 13 our @RECIPIENTS = map {chomp; m|([^/@]*)| && $1} <$k5login>; 14 close $k5login; 11 15 12 16 our %USERS; 13 17 @USERS{@USERS} = undef; 14 18 15 sub zwrite($;$$ ) {16 my ($message, $class, $instance ) = @_;19 sub zwrite($;$$@) { 20 my ($message, $class, $instance, @recipients) = @_; 17 21 $class ||= $ZCLASS; 18 22 $instance ||= 'root.'.hostname; 19 open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -O log -c|, $class, '-i', $instance, '-s', hostname) or die "Couldn't open zwrite"; 23 # @recipients ||= @RECIPIENTS; 24 open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -n -O log -c|, $class, '-i', $instance, '-s', hostname, @RECIPIENTS) or die "Couldn't open zwrite"; 20 25 print ZWRITE $message; 21 26 close(ZWRITE);
Note: See TracChangeset
for help on using the changeset viewer.