summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/MDV/Snapshot/Restore.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/MDV/Snapshot/Restore.pm b/lib/MDV/Snapshot/Restore.pm
index 0576040..93e1ffd 100644
--- a/lib/MDV/Snapshot/Restore.pm
+++ b/lib/MDV/Snapshot/Restore.pm
@@ -43,8 +43,8 @@ sub get_fstab() {
}
sub get_handle {
- my ($fstab, $part, $o_rw) = @_;
- my ($mntpnt) = map { $_->{mntpoint} } grep { $_->{device} eq $part->{device} } @$fstab;
+ my ($part, $o_rw) = @_;
+ my $mntpnt = $part->{mntpoint};
# do not bother failed to mount with ro b/c already mounted:
$mntpnt ? { dir => $mntpnt } : any::inspect($part, $::prefix, $o_rw);
@@ -64,7 +64,7 @@ sub find_disks_with_rsnapshot {
my @found;
foreach my $part (@true_fs) {
- my $handle = get_handle($fstab, $part);
+ my $handle = get_handle($part);
next if !$handle;
next if ! -e "$handle->{dir}/etc/rsnapshot.conf";
@@ -183,7 +183,7 @@ sub main {
},
]);
- my $handle = get_handle($fstab, $system->{part}, 1);
+ my $handle = get_handle($system->{part}, 1);
local $::prefix = $handle->{dir};
# reinit paths according to temp mount point: