summaryrefslogtreecommitdiffstats
path: root/move/move.pm
diff options
context:
space:
mode:
Diffstat (limited to 'move/move.pm')
-rw-r--r--move/move.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/move/move.pm b/move/move.pm
index 3f732545b..d08b585c2 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -301,7 +301,14 @@ sub key_mount {
}
$_->{mntpoint} = '/home';
$_->{options} = $key_mountopts;
- if (eval { fs::mount_part($_); 1 }) {
+ my $ok = eval { fs::mount_part($_); 1 };
+ if ($ok) {
+ my ($kb_size) = MDK::Common::System::df('/home');
+ log::l("$_->{device} is $kb_size KB");
+ $ok = $kb_size > 10 * 1024; #- at least 10 MB
+ fs::umount_part($_) if !$ok;
+ }
+ if ($ok) {
$key_part = $_;
last if -e $key_sysconf;
} else {