summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 404da79)
raw | patch | inline | side by side (parent: 404da79)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 May 2006 11:03:33 +0000 (11:03 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 29 May 2006 11:03:33 +0000 (11:03 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3543 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_servRepositorySetup.inc | patch | blob | history | |
plugins/admin/systems/class_termDNS.inc | patch | blob | history | |
plugins/admin/systems/network.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_servRepositorySetup.inc b/plugins/admin/systems/class_servRepositorySetup.inc
index 4b885bbd90622fba704b992b2d4d69fea2b6ee0d..8fec23baad07671634fe52e988f494a63209d1a5 100644 (file)
if(!empty($cmd)){
$res = shell_exec($cmd);
$res2 = trim($res);
- if((!$res)){
- print_red(sprintf(_("Can't execute specified REPOSITORY_HOOK '%s' please check your gosa.conf."),$cmd));
+ if(!$res){
+ print_red(sprintf(_("Can't execute specified REPOSITORY_HOOK '%s'. Please check your gosa.conf."),$cmd));
}elseif(empty($res2)){
print_red(sprintf(_("The specified REPOSITORY_HOOK '%s', specified in your gosa.conf, returns an empty string."),$cmd));
}else{
index 06af668ebef3a149dd66c28334885c5c0e92c73f..66152454ee4d5897486d193fcde3d90312cdc67e 100644 (file)
var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
/* attribute list for save action */
- var $ignore_account = TRUE;
+ var $ignore_account = true;
+ var $autonet = false;
/* Basic informations
*/
if(isset($this->attrs['cn'][0])){
$this->OrigCn = $this->attrs['cn'][0];
+ $this->cn = $this->attrs['cn'][0];
+ }
+
+ /* Do we have autonet support? */
+ if (isset($this->config->data['MAIN']['AUTO_NETWORK_HOOK'])){
+ $this->autonet= true;
}
/* Hide all dns specific code, if dns is not available
$smarty->assign("staticAddress", "");
+ /* 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];
+ }
+ }
+ }
+ }
+
/* There is no dns available
*/
if($this->DNSenabled == false){
$smarty->assign($attr,$this->$attr);
}
$smarty->assign("staticAddress","<font class=\"must\">*</font>");
+
+ if ($this->autonet){
+ $smarty->assign("autonet", "true");
+ } else {
+ $smarty->assign("autonet", "");
+ }
$display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
return($display);
}else{
index a2188b5757c6ff483db73ff07e52c4a9801b5ff2..2cfaf0e8069a276d949ea1a22a628fc4f1332076 100644 (file)
<td><LABEL for="ipHostNumber">{t}IP-address{/t}{if $IPisMust}{$staticAddress}{/if}</LABEL></td>
<td><input id="ipHostNumber" name="ipHostNumber" size=25 maxlength=80 value="{$ipHostNumber}"></td>
</tr>
- <tr>
+ <tr
<td><LABEL for="macAddress">{t}MAC-address{/t}</LABEL>{$staticAddress}</td>
<td><input name="macAddress" id="macAddress" size=25 maxlength=80 value="{$macAddress}"></td>
</tr>
+ {if $autonet==true}
+ <tr
+ <td> </td>
+ <td><input type="submit" name="autonet" value="{t}Autodetect{/t}"></td>
+ </tr>
+ {/if}
</table>
</td>
{if $DNS_is_account==true}