summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'ldap-site-mngmt/webinterface/lib/rbs_management_functions.php')
-rw-r--r--ldap-site-mngmt/webinterface/lib/rbs_management_functions.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php b/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php
index 6b1f42fd..cc73595e 100644
--- a/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php
+++ b/ldap-site-mngmt/webinterface/lib/rbs_management_functions.php
@@ -194,6 +194,56 @@ function rbs_adjust_host($hostDN, $rbs){
}
}
+# Bei Ă„nderung der TFTP Server IP eines RBS-Objekts entsprechend DHCP Option next-server
+# in den Hostobjekten anpassen
+function adjust_dhcpnextserver($tftpIP, $rbsDN){
+
+ global $ds, $suffix, $ldapError;
+
+ if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=Host)(hlprbservice=$rbsDN))", array("dn"), "dn", "sub", 0, 0))) {
+ # redirect(5, "", $ldapError, FALSE);
+ echo "no search";
+ die;
+ }
+ $result = ldapArraySauber($result);
+ $modtftpentry ['dhcpoptnext-server'] = $tftpIP;
+ foreach ($result as $item){
+ ldap_mod_replace($ds, $item['dn'], $modtftpentry);
+ }
+}
+
+# Bei Ă„nderung des PXE Init Boot File eines RBS-Objekts entsprechend DHCP Option Filename
+# in den Hostobjekten anpassen
+function adjust_dhcpfilename($initbootfile, $rbsDN, $type){
+
+ global $ds, $suffix, $ldapError;
+
+ if(!($result = uniLdapSearch($ds, "ou=RIPM,".$suffix, "(&(objectclass=Host)(hlprbservice=$rbsDN))", array("dn"), "dn", "sub", 0, 0))) {
+ # redirect(5, "", $ldapError, FALSE);
+ echo "no search";
+ die;
+ }
+ $result = ldapArraySauber($result);
+ if ($type == "add"){
+ $modentry ['dhcpoptfilename'] = $initbootfile;
+ foreach ($result as $item){
+ ldap_mod_add($ds, $item['dn'], $modentry);
+ }
+ }
+ elseif ($type == "delete"){
+ $modentry ['dhcpoptfilename'] = array();
+ foreach ($result as $item){
+ ldap_mod_del($ds, $item['dn'], $modentry);
+ }
+ }
+ elseif ($type == "replace"){
+ $modentry ['dhcpoptfilename'] = $initbootfile;
+ foreach ($result as $item){
+ ldap_mod_replace($ds, $item['dn'], $modentry);
+ }
+ }
+}
+
#
# Sucht den Hostname zu einer IP im Rechnerteilbaum der AU