summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-04 13:59:29 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-04 13:59:29 +0000
commit97a5b7b0243d01d38d4d7b642c473d750213996b (patch)
treeed5adbf340901660ca81303631d7e082ba2c1bf8 /perl-install
parentb9961878a22de6da8bf214e4fa810fc8af5f1c34 (diff)
downloaddrakx-backup-do-not-use-97a5b7b0243d01d38d4d7b642c473d750213996b.tar
drakx-backup-do-not-use-97a5b7b0243d01d38d4d7b642c473d750213996b.tar.gz
drakx-backup-do-not-use-97a5b7b0243d01d38d4d7b642c473d750213996b.tar.bz2
drakx-backup-do-not-use-97a5b7b0243d01d38d4d7b642c473d750213996b.tar.xz
drakx-backup-do-not-use-97a5b7b0243d01d38d4d7b642c473d750213996b.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')
-rw-r--r--perl-install/fs/get.pm9
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);