From 92fb8a305b86d85249f5f9d7862f6bf65e1f3b5b Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 25 Mar 2008 20:44:36 +0000 Subject: [PATCH] -dhcp plugin returns a more specific error message when ambiguous dynamic range ownership detected -xCATd now logs startup, explicitly blocks the 'cons' syslog backend, and exits out if syslog unable to provide a suitable logging situation (cons forked if things were that bad and broke DB handles, syslogd needs to run anyway) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@888 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/dhcp.pm | 2 +- xCAT-server-2.0/sbin/xcatd | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm index 6fabfd23c..8cd54fb9b 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm @@ -216,7 +216,7 @@ sub preprocess_request { if ($ntab) { foreach (@{$ntab->getAllEntries()}) { if ($_->{dynamicrange} and not $_->{dhcpserver}) { - $callback->({error=>["In a hierachy, network entries with a dynamic range must be explicit in the dhcpserver field"],errorcode=>[1]}); + $callback->({error=>["Hierarchy requested, therefore networks.dhcpserver must be set for net=".$_->{net}.""],errorcode=>[1]}); return []; } } diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 40e2bb5aa..7869dcca4 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -35,7 +35,8 @@ $XML::Simple::PREFERRED_PARSER='XML::Parser'; use xCAT::Table; use Data::Dumper; use Getopt::Long; -use Sys::Syslog; +use Sys::Syslog qw(:DEFAULT setlogsock); +setlogsock([qw(native,tcp,udp,unix,stream)]); use xCAT::NotifHandler; use xCAT_monitoring::monitorctrl; @@ -340,6 +341,13 @@ sub scan_plugins { } } scan_plugins; +eval { + syslog("local4|info","xCATd: service starting"); +}; +if ($@) { + print "ERROR: $@"; + exit; +} unless ($foreground) { daemonize; }