From 1a3a649b05ffb3f254b1bb9f87ec872a07825138 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Dec 2003 22:15:40 +0000 Subject: - cleanup key_parts() so that it doesn't re-assign mount points each time it is called - mount point assignment moved to key_mount() --- move/move.pm | 12 ++++++------ 1 file 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 { -- cgit v1.2.1