summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-06-21 15:08:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-06-21 15:08:15 +0000
commit5c9c7b2a898a7f6c034938ab073b10431bde2322 (patch)
tree49db45c3d429a061c59e95c932e051072a8295be /move
parentdf0f7fe03cdc33733f12555a520635bff429d6ee (diff)
downloaddrakx-5c9c7b2a898a7f6c034938ab073b10431bde2322.tar
drakx-5c9c7b2a898a7f6c034938ab073b10431bde2322.tar.gz
drakx-5c9c7b2a898a7f6c034938ab073b10431bde2322.tar.bz2
drakx-5c9c7b2a898a7f6c034938ab073b10431bde2322.tar.xz
drakx-5c9c7b2a898a7f6c034938ab073b10431bde2322.zip
don't use "keys" smaller than 10MB (as told by Daniel Andrews on cooker-mandrakemove mailing list)
Diffstat (limited to 'move')
-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 {