From aa6a930bbd1808774e90bbfdaff8b8eab00878d4 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 19 Feb 2008 16:59:49 +0000 Subject: [PATCH] Removed auto_network_hook git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8969 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_termDNS.inc | 37 +++++-------------- .../systems/admin/systems/network.tpl | 4 +- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index a231665c4..81dcc4ecc 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -4,7 +4,6 @@ class termDNS extends plugin { /* attribute list for save action */ var $ignore_account = true; - var $autonet = false; /* Basic informations */ @@ -87,16 +86,6 @@ class termDNS extends plugin } - /************ - * Autonetwork hook - ************/ - - /* Do we have autonet support? */ - if (isset($this->config->data['MAIN']['AUTO_NETWORK_HOOK'])){ - $this->autonet= true; - } - - /************ * DNS ************/ @@ -211,25 +200,17 @@ class termDNS extends plugin $display= ""; $smarty->assign("staticAddress", ""); - $smarty->assign("autonet", $this->autonet); /* Check for autonet button */ - if ($this->autonet && isset($_POST['autonet'])){ - $cmd= $this->config->data['MAIN']['AUTO_NETWORK_HOOK']; - if(!empty($cmd) && $this->cn != ""){ - $res = shell_exec($cmd." ".$this->cn); - if(!$res){ - print_red(sprintf(_("Can't execute specified AUTO_NETWORK_HOOK '%s'. Please check your gosa.conf."),$cmd)); - } else { - $res= split(';', trim($res)); - if (isset($res[0]) && $res[0] != ""){ - $this->ipHostNumber= $res[0]; - } - if (isset($res[1]) && $res[1] != ""){ - $this->macAddress= $res[1]; - } - } - } + if (isset($_POST['autonet'])){ + $d= new gosaSupportDaemon(TRUE, 0.5); + $res= $d->_send("
gosa_network_completition
GOSAGOSA".$this->cn."
", TRUE); + if (isset($res['XML']['IP'])){ + $this->ipHostNumber= $res['XML']['IP']; + } + if (isset($res['XML']['MAC'])){ + $this->macAddress= $res['XML']['MAC']; + } } diff --git a/gosa-plugins/systems/admin/systems/network.tpl b/gosa-plugins/systems/admin/systems/network.tpl index 1685ee88d..d2461a825 100644 --- a/gosa-plugins/systems/admin/systems/network.tpl +++ b/gosa-plugins/systems/admin/systems/network.tpl @@ -26,9 +26,7 @@ {render acl=$macAddressACL} {/render} - {if $autonet==true} - - {/if} + {if $dhcpEnabled} -- 2.30.2