summaryrefslogtreecommitdiffstats
path: root/rescue/guessmounts
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
commit126777bc019a54afb4ec51299f2cf9d2841698aa (patch)
tree97f76e571902ead55ba138f1156a4b4f00b9b779 /rescue/guessmounts
parentf1f67448efc714873378dfeb8279fae68054a90a (diff)
downloaddrakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar
drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.gz
drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.bz2
drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.xz
drakx-backup-do-not-use-126777bc019a54afb4ec51299f2cf9d2841698aa.zip
re-sync after the big svn loss
Diffstat (limited to 'rescue/guessmounts')
-rwxr-xr-xrescue/guessmounts20
1 files changed, 17 insertions, 3 deletions
diff --git a/rescue/guessmounts b/rescue/guessmounts
index 3f3a4e208..4699e3f79 100755
--- a/rescue/guessmounts
+++ b/rescue/guessmounts
@@ -12,10 +12,11 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-use lib qw(../perl-install /usr/lib/libDrakX);
+use lib qw(/usr/lib/libDrakX);
use common;
use fs;
use fs::proc_partitions;
+use fs::type;
my @proc_mounts = fs::read_fstab('', '/proc/mounts');
@@ -33,11 +34,24 @@ print STDERR "\nPlease wait, trying to find your root device...\n";
mkdir_p($target);
+my @parts = map {
+ $_->{device} = delete $_->{dev};
+ put_in_hash($_, fs::type::type_subpart_from_magic($_));
+} fs::proc_partitions::read_raw();
+my ($raid_parts, $normal_parts) = partition { isRawRAID($_) } @parts;
+
+if (@$raid_parts) {
+ require raid;
+ raid::detect_during_install_once(@$raid_parts);
+ my $raids = raid::get_existing(@$raid_parts);
+ push @$normal_parts, @$raids;
+}
+
my @fstab;
my $root;
-foreach (fs::proc_partitions::read_raw()) {
- my $dev = devices::make($_->{dev});
+foreach (@$normal_parts) {
+ my $dev = devices::make($_->{device});
my $fs = find {
system("mount -t $_ $dev $target 2>/dev/null") == 0;