[-]
[+]
|
Changed |
_service:set_version:inventory-system.spec
|
|
[-]
[+]
|
Changed |
_service:recompress:tar_scm:inventory-system-0.0.rev1846.tar.bz2/server/config-custom.inc.php
^
|
@@ -25,4 +25,7 @@
$config["isdf"]["dhcp"]["systemmgmt"]["net6file"] = "/etc/dhcp3/conf.d/systemmgmt6.hosts";
$config["isdf"]["dhcp"]["systempxe"]["net6file"] = "/etc/dhcp3/conf.d/systempxe6.hosts";
+$config["isdf"]["dhcp"]["db_datakey"] = "get_system_type";
+$config["isdf"]["dhcp"]["db_datavalue"] = "baremetal";
+
?>
|
[-]
[+]
|
Changed |
_service:recompress:tar_scm:inventory-system-0.0.rev1846.tar.bz2/server/create_dhcp_configs.php
^
|
@@ -4,8 +4,8 @@
// isdf - dhcp generator
// Author: Carsten Schoene
//
-// $LastChangedDate: 2012-09-17 19:24:23 +0200 (Mon, 17 Sep 2012) $
-// $Rev: 1844 $
+// $LastChangedDate: 2012-09-17 20:40:37 +0200 (Mon, 17 Sep 2012) $
+// $Rev: 1845 $
*/
// define our name
@@ -64,7 +64,7 @@
$pxeend = $pxeinet4->broadcast();
// create dhcp entry for host & pxe
-$qrybkvm="SELECT value FROM inv_system_properties WHERE inv_system_id=(SELECT inv_system_id FROM inv_system_properties WHERE datakey='get_system_type_ix' and value='baremetal-kvm') AND datakey='get_system_net_info';";
+$qrybkvm="SELECT value FROM inv_system_properties WHERE inv_system_id=(SELECT inv_system_id FROM inv_system_properties WHERE datakey='" . $config["isdf"]["dhcp"]["db_datakey"] . "' and value='" . $config["isdf"]["dhcp"]["db_datavalue"] . "') AND datakey='get_system_net_info';";
$dhcpmacs = array();
@@ -129,7 +129,7 @@
// create dhcp entry for mgmt
-$qrymgmtbkvm = "SELECT value FROM inv_system_properties WHERE datakey LIKE 'get_system_mgmt_mac' AND inv_system_id=(SELECT inv_system_id FROM inv_system_properties WHERE datakey='get_system_type_ix' AND value='baremetal-kvm');";
+$qrymgmtbkvm = "SELECT value FROM inv_system_properties WHERE datakey LIKE 'get_system_mgmt_mac' AND inv_system_id=(SELECT inv_system_id FROM inv_system_properties WHERE datakey='" . $config["isdf"]["dhcp"]["db_datakey"] . "' AND value='" . $config["isdf"]["dhcp"]["db_datavalue"] . "');";
$mgmtaddr = explode("/", $config["isdf"]["dhcp"]["systemmgmt"]["net4"]);
$mgmtinet4 = new IPv4($mgmtaddr[0], $mgmtaddr[1]);
$mgmtend = $mgmtinet4->broadcast();
|