Code

Do not do parameter munging anymore - use common goto mechanisms and ctftpd
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Sep 2008 09:25:44 +0000 (09:25 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Sep 2008 09:25:44 +0000 (09:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12561 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc
gosa-plugins/goto/admin/systems/goto/terminalStartup.tpl

index 9ae9ad960c486b930c36e3bbbc0ff357b177206d..665acb09ba6201457dc61da046f445f520829cf8 100644 (file)
@@ -28,7 +28,6 @@ class termstartup extends plugin
   var $view_logged = FALSE;
 
   /* Helper */
-  var $customParameters= "";
   var $orig_dn= "";
   var $ignore_account= TRUE;
 
@@ -52,12 +51,6 @@ class termstartup extends plugin
       $this->$val= array_unique($this->$val);
     }
 
-    if (preg_match("/ o /", $this->gotoKernelParameters)){
-      $this->customParameters= preg_replace ("/^.* o /", "", $this->gotoKernelParameters);
-    } else {
-      $this->customParameters= "";
-    }
-
     /* Prepare Shares */
     if((isset($this->attrs['gotoShare']))&&(is_array($this->attrs['gotoShare']))){
       unset($this->attrs['gotoShare']['count']);
@@ -308,7 +301,7 @@ class termstartup extends plugin
     }
 
     /* Values */
-    foreach(array("gotoBootKernel", "customParameters") as $val){
+    foreach(array("gotoBootKernel", "gotoKernelParameters") as $val){
       $smarty->assign($val, $this->$val);
     }
 
@@ -338,8 +331,8 @@ class termstartup extends plugin
       }
 
       /* Save kernel parameters */
-      if ($this->acl_is_writeable("gotoKernelParameters") && isset($_POST["customParameters"])){
-        $this->customParameters= $_POST["customParameters"];
+      if ($this->acl_is_writeable("gotoKernelParameters") && isset($_POST["gotoKernelParameters"])){
+        $this->gotoKernelParameters= $_POST["gotoKernelParameters"];
       }
     }
   }
@@ -378,17 +371,6 @@ class termstartup extends plugin
       }
     }
     
-    /* Add semi automatic values */
-    // FIXME: LDAP Server may not be set here...
-    $this->gotoKernelParameters= "root=/dev/nfs nfsroot=".
-      $this->gotoTerminalPath.
-      ",ro,hard,nolock,fg,rsize=8192 ".
-      "ip=::::::dhcp ldap=".base64_encode($this->gotoLdapServer);
-
-    if ($this->customParameters != ""){
-      $this->gotoKernelParameters.= " o ".$this->customParameters;
-    }
-
     plugin::save();
 
     /* Add missing arrays */
@@ -508,7 +490,7 @@ class termstartup extends plugin
 
     $source_o = new termstartup ($this->config, $source['dn']);
 
-    foreach(array("gotoModules", "gotoKernelParameters","gotoShares","customParameters","gotoTerminalPath","gotoShares","goLdapServerList","gotoBootKernel","gotoLdapServer","gotoBootKernels") as $attr){
+    foreach(array("gotoModules", "gotoKernelParameters","gotoShares","gotoKernelParameters","gotoTerminalPath","gotoShares","goLdapServerList","gotoBootKernel","gotoLdapServer","gotoBootKernels") as $attr){
       $this->$attr = $source_o->$attr;
     }
   }
index 41d5bfa64d730df87f509aa5950ed90942276dab..bd3c0413c048e34ce50a092927273d75e064dee6 100644 (file)
      </td>
     </tr>
     <tr>
-     <td><LABEL for="customParameters">{t}Custom options{/t}</LABEL></td>
+     <td><LABEL for="gotoKernelParameters">{t}Custom options{/t}</LABEL></td>
      <td>
 {render acl=$gotoKernelParametersACL}
-      <input name="customParameters" id="customParameters"  size=25 maxlength=500
-                value="{$customParameters}" title="{t}Enter any parameters that should be passed to the kernel as append line during bootup{/t}"></td>
+      <input name="gotoKernelParameters" id="gotoKernelParameters"  size=25 maxlength=500
+                value="{$gotoKernelParameters}" title="{t}Enter any parameters that should be passed to the kernel as append line during bootup{/t}"></td>
 {/render}
     </tr>
    </table>