summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: caa4d83)
raw | patch | inline | side by side (parent: caa4d83)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Sep 2008 13:33:43 +0000 (13:33 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Sep 2008 13:33:43 +0000 (13:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12567 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc b/gosa-plugins/goto/admin/systems/services/nfs/class_servNfs.inc
index 158f055f6233e7c353f4f056866889d09258e07e..105d9565db00261eca8d23d45608b98ad50171e0 100644 (file)
$dn = $parent->dn;
plugin::plugin ($config, $dn);
- $this->types = array("CIFS" => "CIFS", "NFS"=>"NFS","samba"=>"samba","netatalk"=>"netatalk","NCP"=>"NCP");
+ $this->types = array("NBD" => "NBD", "CIFS" => "CIFS", "NFS"=>"NFS","samba"=>"samba","netatalk"=>"netatalk","NCP"=>"NCP");
if($dn){
$this->host = substr($dn, 3, strpos($dn, ',')-3);
}
+ asort($this->types);
$this->charsets = array();
$message[]= msgPool::required(_("Path"));
}
- if(!tests::is_path($this->path)){
- $message[]= _("'Path / Volume' must contain at least one '/'!");
+ if($this->type == "NBD") {
+ if (!preg_match('/^[a-z0-9-]+:[0-9]+$/', $this->path)){
+ $message[]= _("'Path / Volume' must be of format 'server:port'!");
+ }
+ } else {
+ if (!tests::is_path($this->path)){
+ $message[]= _("'Path / Volume' must contain at least one '/'!");
+ }
}
if(!in_array($this->type,$this->types)){