Code

Added NBD "shares"
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Sep 2008 13:20:41 +0000 (13:20 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Sep 2008 13:20:41 +0000 (13:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12565 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_config.inc

index b3361539d2f462f0fd7a9ce13e439cc350560658..a3b09a8d8036ba617ec5502d46bf75ddba5e0553 100644 (file)
@@ -550,18 +550,23 @@ class config  {
 
     /* Get NFS server lists */
     $tmp= array("default");
+    $tmp2= array("default");
     $ldap->cd ($this->current['BASE']);
     $ldap->search ("(&(objectClass=goShareServer)(goExportEntry=*))");
     while ($attrs= $ldap->fetch()){
       for ($i= 0; $i<$attrs["goExportEntry"]["count"]; $i++){
-        if(!preg_match('/^[^|]+\|[^|]+\|NFS\|.*$/', $attrs["goExportEntry"][$i])){
-          continue;
-        }
-        $path= preg_replace ("/^[^|]+\|[^|]+\|[^|]+\|[^|]+\|([^|]+).*$/", '\1', $attrs["goExportEntry"][$i]);
-        $tmp[]= $attrs["cn"][0].":$path";
+        if(preg_match('/^[^|]+\|[^|]+\|NFS\|.*$/', $attrs["goExportEntry"][$i])){
+          $path= preg_replace ("/^[^|]+\|[^|]+\|[^|]+\|[^|]+\|([^|]+).*$/", '\1', $attrs["goExportEntry"][$i]);
+          $tmp[]= $attrs["cn"][0].":$path";
+       }
+        if(preg_match('/^[^|]+\|[^|]+\|NBD\|.*$/', $attrs["goExportEntry"][$i])){
+          $path= preg_replace ("/^[^|]+\|[^|]+\|[^|]+\|[^|]+\|([^|]+).*$/", '\1', $attrs["goExportEntry"][$i]);
+          $tmp2[]= $attrs["cn"][0].":$path";
+       }
       }
     }
     $this->data['SERVERS']['NFS']= $tmp;
+    $this->data['SERVERS']['NBD']= $tmp2;
 
     /* Load Terminalservers */
     $ldap->cd ($this->current['BASE']);