mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 00:39:32 -05:00
Handle $disk['fsType'] possibly having "luks:" prefix which checking file system type.
Don't permit choosing encrypted file system type if there's no encryption keyfile present. (Don't know if this is such as good idea or not, may end up changing this again.)
This commit is contained in:
@@ -201,7 +201,7 @@ foreach ($devices as $device) {
|
||||
exec("smartctl -a $type ".escapeshellarg("/dev/$dev")." 2>/dev/null|todos >".escapeshellarg("/$diag/smart/$name-$date.txt"));
|
||||
}
|
||||
// create cache pool information
|
||||
if (is_dir('/mnt/cache') && $disks['cache']['fsType']=='btrfs') {
|
||||
if (is_dir('/mnt/cache') && strpos($disks['cache']['fsType'],'btrfs')) {
|
||||
exec("/sbin/btrfs filesystem usage /mnt/cache 2>/dev/null|todos >".escapeshellarg("/$diag/system/btrfs-usage.txt"));
|
||||
}
|
||||
// create resulting zip file and remove temp folder
|
||||
|
||||
@@ -236,7 +236,7 @@ foreach ($disks as $disk) {
|
||||
if ($disk['numErrors']>0) $errors[] = "$text - $info (errors {$disk['numErrors']})";
|
||||
// check file system of cache pool
|
||||
$item = 'pool';
|
||||
if ($name=='cache' && $disk['fsType']=='btrfs') {
|
||||
if ($name=='cache' && strpos($disk['fsType'],'btrfs')) {
|
||||
$attr = 'missing';
|
||||
if (exec("/sbin/btrfs filesystem show {$disk['uuid']} 2>/dev/null|grep -c 'missing'")>0) {
|
||||
if (empty($saved[$item][$attr])) {
|
||||
|
||||
Reference in New Issue
Block a user