Commit ef147a66 authored by Côme Chilliet's avatar Côme Chilliet

🚑 fix(fai) Remove :encrypt option which was deprecated since FAI 3.3.3

issue #5821
parent 5b1713b7
...@@ -97,9 +97,6 @@ class DiskPartitionsAttribute extends DialogOrderedArrayAttribute ...@@ -97,9 +97,6 @@ class DiskPartitionsAttribute extends DialogOrderedArrayAttribute
protected function getAttributeArrayValue($key, $value) protected function getAttributeArrayValue($key, $value)
{ {
$opt = array(); $opt = array();
if (isset($value['encrypted']) && $value['encrypted']) {
$opt[] = _('encrypted');
}
if (isset($value['bootable']) && $value['bootable']) { if (isset($value['bootable']) && $value['bootable']) {
$opt[] = _('bootable'); $opt[] = _('bootable');
} }
...@@ -471,7 +468,7 @@ class faiDiskEntry extends simplePlugin ...@@ -471,7 +468,7 @@ class faiDiskEntry extends simplePlugin
} }
/* Unset non valid attributes */ /* Unset non valid attributes */
foreach (array('bootable','encrypted','preserve','resize','FAIdiskType') as $attr) { foreach (array('bootable','preserve','resize','FAIdiskType') as $attr) {
if (isset($tmp['partitions'][$id][$attr])) { if (isset($tmp['partitions'][$id][$attr])) {
unset($tmp['partitions'][$id][$attr]); unset($tmp['partitions'][$id][$attr]);
} }
......
...@@ -321,10 +321,6 @@ class faiPartition extends simplePlugin ...@@ -321,10 +321,6 @@ class faiPartition extends simplePlugin
array('swap','ext2','ext3','ext4','reiserfs','xfs','btrfs','-'), 'ext4', array('swap','ext2','ext3','ext4','reiserfs','xfs','btrfs','-'), 'ext4',
array(_('swap'),_('ext2'),_('ext3'),_('ext4'),_('reiser fs'),_('xfs'),_('btrfs'),_('LVM/RAID')) array(_('swap'),_('ext2'),_('ext3'),_('ext4'),_('reiser fs'),_('xfs'),_('btrfs'),_('LVM/RAID'))
), ),
new BooleanAttribute (
_('Encrypted'), _('Wether or not this partition is encrypted'),
'encrypted', FALSE
),
new FaiMountPointAttribute ( new FaiMountPointAttribute (
_('Mount point'), _('Mount point for this partition'), _('Mount point'), _('Mount point for this partition'),
'FAImountPoint', TRUE 'FAImountPoint', TRUE
...@@ -423,14 +419,6 @@ class faiPartition extends simplePlugin ...@@ -423,14 +419,6 @@ class faiPartition extends simplePlugin
$this->$attr = $object[$attr]; $this->$attr = $object[$attr];
} }
} }
if (($this->FAIdiskType == 'disk') || ($this->FAIdiskType == 'lvm')) {
/* Check for encrypted partitions */
if (preg_match('/:encrypt$/', $this->FAImountPoint)) {
$this->FAImountPoint = preg_replace('/:encrypt/', '', $this->FAImountPoint);
$this->encrypted = TRUE;
}
}
} }
if ($this->FAIdiskType != 'lvm') { if ($this->FAIdiskType != 'lvm') {
...@@ -530,12 +518,7 @@ class faiPartition extends simplePlugin ...@@ -530,12 +518,7 @@ class faiPartition extends simplePlugin
$ret[$attr] = $this->$attr; $ret[$attr] = $this->$attr;
} }
if (($this->FAIdiskType == 'disk') || ($this->FAIdiskType == 'lvm')) { if ($this->FAIdiskType == 'raid') {
/* Add encryption flag to partition mount point */
if ($this->encrypted) {
$ret['FAImountPoint'] .= ':encrypt';
}
} elseif ($this->FAIdiskType == 'raid') {
$ret['FAIpartitionSize'] = $ret['raidDevices']; $ret['FAIpartitionSize'] = $ret['raidDevices'];
unset($ret['raidDevices']); unset($ret['raidDevices']);
} elseif ($this->FAIdiskType == 'cryptsetup') { } elseif ($this->FAIdiskType == 'cryptsetup') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment