ispman/scripts ldifupdate,1.4,1.5

[email protected]
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3807/scripts

Modified Files:
	ldifupdate 
Log Message:
don't check DefaultWebHost/DefaultFileserver on replica domains

comment on undefined DefaultWebHost/DefaultFileserver

Index: ldifupdate
===================================================================
RCS file: /cvsroot/ispman/ispman/scripts/ldifupdate,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ldifupdate	1 Feb 2004 14:01:20 -0000	1.4
+++ ldifupdate	1 Feb 2004 15:56:12 -0000	1.5
@@ -175,24 +175,34 @@
 	if ($entry->get_value("ispmanDomainType") eq "replica") {
 	    $msg.=update_oc($entry,\@oc,\@oc_replicaDomain);
 	} else {
+
+	    ## normal domain
 	    $msg.=update_oc($entry,\@oc,\@oc_normalDomain);
-	}
 
-	# check ispmanDomainDefaultFileServer attribute
-	if (! defined $entry->get_value("ispmanDomainDefaultFileServer")){
-	    $msg.="WARNING! no \"Default Fileserver\" defined!\n";
-	    foreach (@default_fileserver){
-		$msg.="adding ispmanDomainDefaultFileServer: \"$_\"\n";
-		ldif_action("add","ispmanDomainDefaultFileServer",$_);
+	    # check ispmanDomainDefaultFileServer attribute
+	    if (! defined $entry->get_value("ispmanDomainDefaultFileServer")){
+		$msg.="WARNING! no \"Default Fileserver\" defined!\n";
+		if (@default_fileserver) {
+		    foreach (@default_fileserver){
+			$msg.="adding ispmanDomainDefaultFileServer: \"$_\"\n";
+			ldif_action("add","ispmanDomainDefaultFileServer",$_);
+		    }
+		} else {
+		    $msg.="Please adjust \@default_fileserver array to set them automatically\n";
+		}
 	    }
-	}
-
-	# check ispmanDomainDefaultWebServer attribute
-	if (! defined $entry->get_value("ispmanDomainDefaultWebHost")){
-	    $msg.="WARNING! no \"Default Webhost\" defined!\n";
-	    foreach (@default_webhost){
-		$msg.="adding ispmanDomainWebHost: \"$_\"\n";
-		ldif_action("add","ispmanDomainDefaultWebHost",$_);
+	    
+	    # check ispmanDomainDefaultWebServer attribute
+	    if (! defined $entry->get_value("ispmanDomainDefaultWebHost")){
+		$msg.="WARNING! no \"Default Webhost\" defined!\n";
+		if (@default_webhost) {
+		    foreach (@default_webhost){
+			$msg.="adding ispmanDomainWebHost: \"$_\"\n";
+			ldif_action("add","ispmanDomainDefaultWebHost",$_);
+		    }
+		} else {
+		    $msg.="Please adjust \@default_webhost array to set them automatically\n";
+		}
 	    }
 	}
 



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.