- Timestamp:
- Feb 25, 2008, 4:26:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/fedora/config/etc/syslog-ng/d_zroot.pl
r664 r665 5 5 use Sys::Hostname; 6 6 7 sub sendmsg { 8 my ($message) = @_; 9 open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -c scripts-auto|, '-i', 'root.'.hostname, '-s', hostname) or die "Couldn't open zwrite"; 7 sub sendmsg($;$$) { 8 my ($message, $class, $instance) = @_; 9 $class ||= "scripts-auto"; 10 $instance ||= 'root.'.hostname; 11 open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -c|, $class, '-i', $instance, '-s', hostname) or die "Couldn't open zwrite"; 10 12 print ZWRITE $message; 11 13 close(ZWRITE); … … 25 27 sendmsg($send); 26 28 } 29 } elsif ($message =~ m|session \S+ for user root |) { 30 sendmsg($message); 27 31 } 32 28 33 $last = $message; 29 34 }
Note: See TracChangeset
for help on using the changeset viewer.