summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-12-04 22:15:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-12-04 22:15:40 +0000
commit1a3a649b05ffb3f254b1bb9f87ec872a07825138 (patch)
tree3f0624efb0f889282f0a277ec62a25e1a184cc65
parentbd9dc778edc3bb6c26bb7eca159ab4fbeb12c3f7 (diff)
downloaddrakx-backup-do-not-use-1a3a649b05ffb3f254b1bb9f87ec872a07825138.tar
drakx-backup-do-not-use-1a3a649b05ffb3f254b1bb9f87ec872a07825138.tar.gz
drakx-backup-do-not-use-1a3a649b05ffb3f254b1bb9f87ec872a07825138.tar.bz2
drakx-backup-do-not-use-1a3a649b05ffb3f254b1bb9f87ec872a07825138.tar.xz
drakx-backup-do-not-use-1a3a649b05ffb3f254b1bb9f87ec872a07825138.zip
- cleanup key_parts() so that it doesn't re-assign mount points each time it is
called - mount point assignment moved to key_mount()
-rw-r--r--move/move.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/move/move.pm b/move/move.pm
index 51ad2b953..8e131c826 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -242,11 +242,7 @@ sub key_parts {
return () if $key_disabled;
my @keys = grep { detect_devices::isKeyUsb($_) } @{$o->{all_hds}{hds}};
- map_index {
- $_->{mntpoint} = $::i ? "/mnt/key$::i" : '/home';
- $_->{options} = $key_mountopts;
- $_;
- } (fsedit::get_fstab(@keys), grep { detect_devices::isKeyUsb($_) } @{$o->{all_hds}{raw_hds}});
+ (fsedit::get_fstab(@keys), grep { detect_devices::isKeyUsb($_) } @{$o->{all_hds}{raw_hds}});
}
sub key_mount {
@@ -262,7 +258,11 @@ sub key_mount {
}
require fs;
- eval { fs::mount_part($_) } foreach key_parts($o);
+ each_index {
+ $_->{mntpoint} = $::i ? "/mnt/key$::i" : '/home';
+ $_->{options} = $key_mountopts;
+ eval { fs::mount_part($_); 1 } or delete $_->{mntpoint};
+ } key_parts($o);
}
sub key_umount {