Commit c35ca30e authored by Mike Hibler's avatar Mike Hibler

Update script to add exports_setup to syslog/newsyslog.

parent b0948667
#
# Add logging of exports_setup
#
use strict;
use libinstall;
use installvars;
my $LOGFILE = "$TBROOT/log/exports_setup.log";
sub InstallUpdate($$)
{
my ($version, $phase) = @_;
#
# If something should run in the pre-install phase.
#
if ($phase eq "pre") {
Phase "setup", "Adding exports_setup logging", sub {
Phase "syslog.conf", "Updating $SYSLOG_CONF", sub {
DoneIfEdited($SYSLOG_CONF);
BackUpFileFatal($SYSLOG_CONF);
AppendToFileFatal($SYSLOG_CONF,
"!exports_setup", "*.*\t\t\t\t\t\t$LOGDIR/exports_setup.log");
};
Phase "logfile", "Creating $LOGFILE", sub {
DoneIfExists($LOGFILE);
CreateFileFatal($LOGFILE);
ExecQuietFatal("$CHGRP tbadmin $LOGFILE");
ExecQuietFatal("$CHMOD 640 $LOGFILE");
};
Phase "newsyslog", "Updating $NEWSYSLOG_CONF", sub {
DoneIfEdited($NEWSYSLOG_CONF);
BackUpFileFatal($NEWSYSLOG_CONF);
AppendToFileFatal($NEWSYSLOG_CONF,
"$LOGFILE 640 5 1000 * Z");
};
Phase "syslogd", "Restarting syslogd", sub {
HUPDaemon("syslog");
};
};
}
#
# If something should run in the post-install phase.
#
if ($phase eq "post") {
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment