Index: trunk/cgi-bin/IPDB.pm
===================================================================
--- trunk/cgi-bin/IPDB.pm	(revision 419)
+++ trunk/cgi-bin/IPDB.pm	(revision 420)
@@ -59,4 +59,5 @@
 # mostly for rwhois
 ##fixme:  leave these blank by default?
+our $rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd';	# to match ./configure defaults from rwhoisd-1.5.9.6
 our $org_street = '123 4th Street';
 our $org_city = 'Anytown';
@@ -853,4 +854,6 @@
   }
 
+  return if !@reciplist;
+
   foreach my $recip (@reciplist) {
     $mailer->mail("ipdb\@$domain");
Index: trunk/cgi-bin/MyIPDB.pm
===================================================================
--- trunk/cgi-bin/MyIPDB.pm	(revision 419)
+++ trunk/cgi-bin/MyIPDB.pm	(revision 420)
@@ -29,4 +29,5 @@
 #$IPDB::defcustid = '5554242';
 # Globals for db2rwhois.pl
+#$IPDB::rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd';
 #$IPDB::org_street = '123 4th Street';
 #$IPDB::org_city = 'Anytown';
Index: trunk/cgi-bin/extras/db2rwhois.pl
===================================================================
--- trunk/cgi-bin/extras/db2rwhois.pl	(revision 419)
+++ trunk/cgi-bin/extras/db2rwhois.pl	(revision 420)
@@ -26,10 +26,8 @@
 #$ENV{"PATH"} = "/bin;/usr/bin";
 
-my $rwhoisDataPath = "/etc/rwhoisd";
-
 my @autharea;
 my $authrw;
 # Use the template file to allow us to keep persistent nodes aside from netblock data
-open AUTHTEMPLATE, "<$rwhoisDataPath/rwhoisd.auth_template";
+open AUTHTEMPLATE, "<$IPDB::rwhoisDataPath/rwhoisd.auth_template";
 my $template_persist;
 while (<AUTHTEMPLATE>) {
@@ -48,5 +46,5 @@
 
 # Get the list of live directories for potential deletion
-opendir RWHOISROOT, $rwhoisDataPath;
+opendir RWHOISROOT, $IPDB::rwhoisDataPath;
 my %rwhoisdirs;
 foreach (readdir RWHOISROOT) {
@@ -104,5 +102,5 @@
 
 # Hokay.  Gonna do checks *here* to see if we need to create new master trees
-  my $netdatadir = "$rwhoisDataPath/$rwnet";
+  my $netdatadir = "$IPDB::rwhoisDataPath/$rwnet";
   if (! -e $netdatadir) {
     print " New master $masterblocks[$i]!\n";
@@ -152,5 +150,5 @@
     print "  Copying template files...\n";
 ##fixme: find a way to do this without a shell (or functional equivalent)
-    qx { /bin/cp $rwhoisDataPath/skel/attribute_defs/* $netdatadir/attribute_defs/ };
+    qx { /bin/cp $IPDB::rwhoisDataPath/skel/attribute_defs/* $netdatadir/attribute_defs/ };
 
 ##fixme: not sure if this is even necessary, since it's not referenced anywhere I can recall...
@@ -188,5 +186,5 @@
   my $masterfilename = "$rwnet/data/network/".$masterblocks[$i]->addr."-".$masterblocks[$i]->masklen.".txt";
 
-  open MASTERFILE,">$rwhoisDataPath/$masterfilename";
+  open MASTERFILE,">$IPDB::rwhoisDataPath/$masterfilename";
 
   print MASTERFILE "ID: NETBLK-ISP.$masterblocks[$i]\n".
@@ -310,5 +308,5 @@
 foreach my $netdir (keys %rwhoisdirs) {
   print "deleting obsolete directory $netdir...\n";
-  rmtree ( "$rwhoisDataPath/$netdir", { verbose => 1, error => \my $errlist } );
+  rmtree ( "$IPDB::rwhoisDataPath/$netdir", { verbose => 1, error => \my $errlist } );
   for my $diag (@$errlist) {
     my ($file, $message) = each %$diag;
@@ -323,5 +321,5 @@
 if ($authrw) {
   print "Regenerating auth_area\n";
-  open RWHOISDAUTH, ">$rwhoisDataPath/rwhoisd.auth_area";
+  open RWHOISDAUTH, ">$IPDB::rwhoisDataPath/rwhoisd.auth_area";
   print RWHOISDAUTH "# WARNING: This file is autogenerated!  Any static nodes should\n".
 		"# be entered in /etc/rwhoisd/rwhoisd.auth_template\n";
@@ -339,7 +337,7 @@
 
   # restart/reload rwhoisd
-  if (-e "$rwhoisDataPath/rwhoisd.pid") {	# no pidfile, no restart.
+  if (-e "$IPDB::rwhoisDataPath/rwhoisd.pid") {	# no pidfile, no restart.
     print "Restarting rwhoisd\n";
-    open PIDFILE, "<$rwhoisDataPath/rwhoisd.pid";
+    open PIDFILE, "<$IPDB::rwhoisDataPath/rwhoisd.pid";
     my ($rwpid) = (<PIDFILE> =~ /^(\d+)/);
     close PIDFILE;
Index: trunk/cgi-bin/main.cgi
===================================================================
--- trunk/cgi-bin/main.cgi	(revision 419)
+++ trunk/cgi-bin/main.cgi	(revision 420)
@@ -961,5 +961,5 @@
       if (!$status) {
 	printError("Customer ID not valid.  Make sure the Customer ID ".
-	  "is correct.<br>\nUse STAFF for staff static IPs, and $defcustid for any other ".
+	  "is correct.<br>\nUse STAFF for staff static IPs, and $IPDB::defcustid for any other ".
 	  "non-customer assignments.");
 	return;
