From e802ef13dec3e2e6707c7e8feadb72c7e8ffbcd4 Mon Sep 17 00:00:00 2001
From: Pascal Rigaux <pixel@mandriva.com>
Date: Thu, 20 Nov 2003 18:08:15 +0000
Subject: fix mounting things when using existing config

---
 move/move.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'move')

diff --git a/move/move.pm b/move/move.pm
index a126a4b4a..a0f9ac5f6 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -362,7 +362,6 @@ sub install2::configMove {
 
     require install_any;
     install_any::write_fstab($o);
-    $_->{mntpoint} && !$_->{isMounted} and run_program::run('mount', $_->{mntpoint}) foreach fsedit::get_really_all_fstab($o->{all_hds});
 
     modules::write_conf('');
     require mouse;
@@ -437,6 +436,14 @@ sub install2::startMove {
     my ($w, $h) = ($pixbuf->get_width, $pixbuf->get_height);
     $root->draw_pixbuf(Gtk2::Gdk::GC->new($root), $pixbuf, 0, 0, ($::rootwidth - $w) / 2, ($::rootheight - $h)/2, $w, $h, 'none', 0, 0);
     ugtk2::gtkflush();
+
+    #- get info from existing fstab. This won't do anything if we already wrote fstab in configMove
+    fs::get_info_from_fstab($o->{all_hds}, '');
+    foreach (fsedit::get_really_all_fstab($o->{all_hds})) {
+	$_->{mntpoint} && !$_->{isMounted} && $_->{options} !~ /\bnoauto\b/ or next;
+	mkdir_p($_->{mntpoint});
+	run_program::run('mount', $_->{mntpoint});
+    }
     
     install_TrueFS_in_home($o);
 
-- 
cgit v1.2.1