@@ -4,8 +4,8 @@
// isdf - dhcp generator
// Author: Carsten Schoene
//
-// $LastChangedDate: 2012-09-30 19:51:40 +0200 (Sun, 30 Sep 2012) $
-// $Rev: 1884 $
+// $LastChangedDate: 2012-10-01 15:49:50 +0200 (Mon, 01 Oct 2012) $
+// $Rev: 1890 $
*/
// define our name
@@ -113,11 +113,11 @@
if ( $systeminet4->isipin($systemfirst) ) {
$revhost = $config["isdf"]["dhcp"]["system"]["hostnameprefix"] . preg_replace('/\./','-', $systemfirst);
$reread = true;
+ if ( $config["isdf"]["dhcp"]["guacamole"]["createconfig"] ) {
+ $guacamole[$revhost] = $systemfirst;
+ }
while ( !($retval = $dhcpsystem->hostExists($revhost,$mac, $reread)) === false ) {
if ( $retval == 2 ) {
- if ( $config["isdf"]["dhcp"]["guacamole"]["createconfig"] ) {
- $guacamole[$revhost] = $systemfirst;
- }
// mac exists
break 2;
} elseif ( $retval == 1 ) {
@@ -125,17 +125,11 @@
$systemfirst = $systeminet4->increment($systemfirst,$systemend);
$revhost = $config["isdf"]["dhcp"]["system"]["hostnameprefix"] . preg_replace('/\./', '-', $systemfirst);
$reread = false;
- if ( $config["isdf"]["dhcp"]["guacamole"]["createconfig"] ) {
- $guacamole[$revhost] = $systemfirst;
- }
} else {
break;
}
}
$dhcpsystem->addHost($revhost,$mac,$systemfirst);
- if ( $config["isdf"]["dhcp"]["guacamole"]["createconfig"] ) {
- $guacamole[$revhost] = $systemfirst;
- }
}
}
if ( $config["isdf"]["dhcp"]["guacamole"]["createconfig"] ) {
|