Ignore:
Timestamp:
Aug 2, 2008, 5:17:54 PM (14 years ago)
Author:
geofft
Message:
Make d_zroot.pl zephyr people in the .k5login in personals
File:
1 edited

Legend:

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

    r770 r783  
    99our $ZCLASS = "scripts-auto";
    1010our @USERS = qw/root logview/;
     11my $k5login;
     12open $k5login, '/root/.k5login';
     13our @RECIPIENTS = map {chomp; m|([^/@]*)| && $1} <$k5login>;
     14close $k5login;
    1115
    1216our %USERS;
    1317@USERS{@USERS} = undef;
    1418
    15 sub zwrite($;$$) {
    16     my ($message, $class, $instance) = @_;
     19sub zwrite($;$$@) {
     20    my ($message, $class, $instance, @recipients) = @_;
    1721    $class ||= $ZCLASS;
    1822    $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";
    2025    print ZWRITE $message;
    2126    close(ZWRITE);
Note: See TracChangeset for help on using the changeset viewer.