diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc
index b646b24208d99ecaa30b3d62cf6e03b76cf6b0e7..ccfaa3828c57eefd01e4a17e4418c8d2ed241c8d 100644 (file)
/* Generic terminal attributes */
var $bootmode= "G";
var $goLdapServerList= array();
- var $gotoBootKernel= "";
+ var $gotoBootKernel= "default-inherit";
var $gotoKernelParameters= "";
var $gotoLdapServer= "";
var $gotoModules= array();
{
plugin::plugin ($config, $dn);
- $this->gotoBootKernels = array("default"=>"["._("inherited")."]");
+ $this->gotoBootKernels = array("default-inherit"=>"["._("inherited")."]");
/* Get arrays */
foreach (array("gotoModules") as $val){
} else {
$fh= popen($command, "r");
while (!feof($fh)) {
- $buffer= fgets($fh, 256);
+ $buffer= trim(fgets($fh, 256));
+
if(!empty($buffer)){
- $this->gotoBootKernels[]= $buffer;
+
+ $name=$value = $buffer;
+
+ if(preg_match("/:/",$buffer)){
+ $name = preg_replace("/:.*$/","",$buffer);
+ $value= preg_replace("/^.*:/","",$buffer);
+ $this->gotoBootKernels[$name]= $name.":".$value;
+ }else{
+ $this->gotoBootKernels[$name]= $value;
+ }
}
}
pclose($fh);
$tmp = $this->config->data['SERVERS']['LDAP'];
foreach($tmp as $server){
$visible = $server;
- if($server == "default"){
+ if($server == "default-inherit"){
$visible = "["._("inherited")."]";
}
$this->goLdapServerList[$server] = $visible;
switch ($name){
case 'gotoLdapServer':
- $this->goLdapServerList= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->goLdapServerList);
+ $this->goLdapServerList= array_merge(array('default-inherit' => _("inherited").' ['.$attrs[$name][0].']' ), $this->goLdapServerList);
break;
}
}
/* Find proper terminal path for tftp configuration
FIXME: This is suboptimal when the default has changed to
another location! */
- if ($this->gotoTerminalPath == "default"){
+ if ($this->gotoTerminalPath == "default-inherit"){
$ldap= $this->config->get_ldap_link();
/* Strip relevant part from dn, keep trailing ',' */
/* Strip out 'default' values */
foreach(array("gotoBootKernel","gotoLdapServer") as $value){
- if (!isset($this->attrs[$value]) || $this->attrs[$value] == "default"){
+ if (!isset($this->attrs[$value]) || $this->attrs[$value] == "default-inherit"){
$this->attrs[$value] = array();
}
}
"plProvidedAcls"=> array(
"gotoLdapServer" => _("Ldap server"),
"gotoBootKernel" => _("Boot kernel"),
- "gotoKernelParameters"=> _("Kernel paramenter"))
+ "gotoKernelParameters"=> _("Kernel parameter"))
));
}