diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-04-04 13:59:29 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-04-04 13:59:29 +0000 |
commit | 43e8aa682bf5bb022d656ac643d88ce908e8d4d4 (patch) | |
tree | ed5adbf340901660ca81303631d7e082ba2c1bf8 /perl-install/fs | |
parent | 0b5bf3f0964824c7a7e496e3e485bc5be265f265 (diff) | |
download | drakx-43e8aa682bf5bb022d656ac643d88ce908e8d4d4.tar drakx-43e8aa682bf5bb022d656ac643d88ce908e8d4d4.tar.gz drakx-43e8aa682bf5bb022d656ac643d88ce908e8d4d4.tar.bz2 drakx-43e8aa682bf5bb022d656ac643d88ce908e8d4d4.tar.xz drakx-43e8aa682bf5bb022d656ac643d88ce908e8d4d4.zip |
(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
Diffstat (limited to 'perl-install/fs')
-rw-r--r-- | perl-install/fs/get.pm | 9 |
1 files changed, 9 insertions, 0 deletions
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); |