Changeset 646


Ignore:
Timestamp:
Feb 11, 2008, 1:01:37 PM (14 years ago)
Author:
quentin
Message:
Send to host-specific instance, and send for both root and logview
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/fedora/config/etc/syslog-ng/d_zroot.pl

    r645 r646  
    77sub sendmsg {
    88    my ($message) = @_;
    9     open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -c scripts -i root -s|, hostname) or die "Couldn't open zwrite";
     9    open(ZWRITE, "|-", qw|/usr/bin/zwrite -d -c scripts|, '-i', 'root.'.hostname, '-s', hostname) or die "Couldn't open zwrite";
    1010    print ZWRITE $message;
    1111    close(ZWRITE);
     
    1717    chomp $message;
    1818    $message =~ s/^(.*?): //;
    19     if ($message =~ m|Accepted (\S+) for root|) {
     19    if ($message =~ m|Accepted (\S+) for (\S+)|) {
    2020        my $send = $message;
    2121        if ($1 eq "gssapi-with-mic") {
    2222            $send = $last."\n".$send;
    2323        }
    24         sendmsg($send);
     24        if ($2 eq "root" or $2 eq "logview") {
     25            sendmsg($send);
     26        }
    2527    }
    2628    $last = $message;
Note: See TracChangeset for help on using the changeset viewer.