aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--transfugdrake.pm24
1 files changed, 14 insertions, 10 deletions
diff --git a/transfugdrake.pm b/transfugdrake.pm
index 8b5cba6..3217fc5 100644
--- a/transfugdrake.pm
+++ b/transfugdrake.pm
@@ -116,21 +116,27 @@ sub mount_partition {
my $win_partition = $_[1];
my $mountpoint = "/mnt/windows";
my @mounts;
+ my $mounted = 0;
+ my @tmp;
(@mounts) = cat_('/proc/mounts');
foreach (@mounts) {
- print "$_\n";
+ @tmp = split(' ', $_);
+ print "$tmp[0]\n";
+ if($tmp[0] eq $win_partition) { $mounted = 1; }
}
- if(-e $mountpoint) {
- $mountpoint .= '2';
- }
- mkdir($mountpoint);
-
- print "mount -t $fstype $win_partition $mountpoint\n";
- #if(`mount -t $fstype $win_partition $mountpoint`) { print "Error\n:"; }
+ if(!$mounted) {
+ if(-e $mountpoint) {
+ $mountpoint .= '2';
+ }
+ mkdir($mountpoint);
+ print "mount -t $fstype $win_partition $mountpoint\n";
+ if(`mount -t $fstype $win_partition $mountpoint`) { print "Error\n:"; }
+ }
+
return $mountpoint;
}
@@ -144,8 +150,6 @@ sub get_windows_config {
# Mount it
$config->{mountpoint} = mount_partition($config->{fstype}, $config->{partition});
- # Get the Windows version
- $config->{version} = $get_windows_version($config->{mountpoint});
# Find where the documents are
# If possible, get some registry config
return %config;