From 43e8aa682bf5bb022d656ac643d88ce908e8d4d4 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 4 Apr 2013 13:59:29 +0000 Subject: (root_from_mounted) introduce it in order to fix mga#8717 try harder to lookup / partition by looking at mounted point when / is missing from /etc/fstab --- perl-install/fs/get.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/perl-install/fs/get.pm b/perl-install/fs/get.pm index 096402e6f..5582cf86e 100644 --- a/perl-install/fs/get.pm +++ b/perl-install/fs/get.pm @@ -119,6 +119,15 @@ sub has_mntpoint { my ($mntpoint, $all_hds) = @_; mntpoint2part($mntpoint, [ really_all_fstab($all_hds) ]); } + +sub root_from_mounted() { + foreach (`df -P`) { + next if m!^[^/]!; # ignore tootfs + my ($fs, undef, undef, undef, undef, $mntpnt) = split(/\s+/); + return $fs if $mntpnt eq '/'; + } +} + sub root_ { my ($fstab, $o_boot) = @_; $o_boot && mntpoint2part("/boot", $fstab) || mntpoint2part("/", $fstab); -- cgit v1.2.1