diff --git a/plugins/admin/fai/class_faiPartitionTableEntry.inc b/plugins/admin/fai/class_faiPartitionTableEntry.inc
index 64c716be4dd88e6f3274609f8957e33a10e7b65e..fea90b82df77a779d89ca53d47a8343dc1e67ef8 100644 (file)
{
/* Define Arrays with allowed syntax */
$PartitionTypes = array("primary","logical");
- $FAIfsTypes = array("ext2","ext3","xfs","swap","reiserfs","dos fat 16","win fat 32");
+ $FAIfsTypes = array("ext2","ext3","xfs","swap","reiserfs","dosfat16","winfat32");
/* Display Header */
$str = "<table style='width:100%'>";
{
$message= array();
- /* Check descriptions
- */
- if(empty($this->DISK_description)){
- $message[] = _("Please enter a description for your disk.");
- }
-
/* check every partition.
* if there is an invalid value defined, append an errorstr to message
*/
foreach($this->partitions as $key => $part){
- if(in_array($part['FAImountPoint'],$alreadyUsed['FAImountPoint'])){
+ if((in_array($part['FAImountPoint'],$alreadyUsed['FAImountPoint']))&&($part['FAIfsType']!="swap")){
$message[]=sprintf(_("please enter a unique mount point for partition %s"),($key));
}
- if((empty($part['FAImountPoint']))||(!((preg_match("/^\/.*/",$part['FAImountPoint']))||(preg_match("/^swap$/",$part['FAImountPoint']))))){
- $message[]=sprintf(_("Please enter a valid mount point for partition %s." ),($key));
+ if($part['FAIfsType']!="swap"){
+ if((empty($part['FAImountPoint']))||(!((preg_match("/^\/.*/",$part['FAImountPoint']))||(preg_match("/^swap$/",$part['FAImountPoint']))))){
+ $message[]=sprintf(_("Please enter a valid mount point for partition %s." ),($key));
+ }
}
-
if($part['FAIfsType'] == "swap"){
if(in_array($part['FAIfsType'],$alreadyUsed['FAIfsType'])){
$message[]=sprintf(_("File system type 'swap' is already used, change file system type for partition %s."),$key);
}
}
+ if(($part['FAIfsType'] == "swap")&&(!empty($part['FAImountPoint']))&&($part['FAImountPoint']!="swap")){
+ $message[]=_("Please use 'swap' as mount point, if 'swap' is used as fs-type.");
+ }
$tmp = split("-",$part['FAIpartitionSize']);
switch (count($tmp)){