monitoring/NPalert/NotifIniInterface.pm | 5 +++++
monitoring/NPalert/scripts/notif-launcher | 5 +++++
2 files changed, 10 insertions(+)
New commits:
commit b55cb176e84c519a9dcd2f68f7e75521205f98d7
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Jan 27 16:43:47 2012 +0100
730305 - Upon start, wait for generate-config to generate the config.
Addressing
2012-01-24 12:10:53 no file /etc/notification/generated/customers.ini No such file or
directory at /usr/share/perl5/vendor_perl/NOCpulse/Notif/NotificationIni.pm line 86.
diff --git a/monitoring/NPalert/NotifIniInterface.pm
b/monitoring/NPalert/NotifIniInterface.pm
index 063bd90..85fd7e3 100644
--- a/monitoring/NPalert/NotifIniInterface.pm
+++ b/monitoring/NPalert/NotifIniInterface.pm
@@ -200,6 +200,11 @@ sub buildContactGroups {
} # End of buildContactGroups
+sub checkCustomersExist {
+ my $self = shift;
+ return (-f ($self->config_dir . "/customers.ini"));
+}
+
####################
sub buildCustomers {
####################
diff --git a/monitoring/NPalert/scripts/notif-launcher
b/monitoring/NPalert/scripts/notif-launcher
index ec77dd3..b08f31a 100755
--- a/monitoring/NPalert/scripts/notif-launcher
+++ b/monitoring/NPalert/scripts/notif-launcher
@@ -65,6 +65,11 @@ my $SOCKET_FILENAME="$TMPDIR/escsock"; ## TBD -- replace
with config file entr
use vars qw ( $lastcfgcheck $CUSTOMERS $FORMATS $SCHEDULES
$METHODS $GROUPS $REDIRECTS);
+my $interface=new NOCpulse::Notif::NotifIniInterface;
+while (not $interface->checkCustomersExist()) {
+ $Log->log(1, "Customers not yet generated by generate-config, sleeping for a
while.\n");
+ sleep 5;
+}
&loadConfig();
Show replies by date