summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2002-10-09 13:47:44 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2002-10-09 13:47:44 +0000
commit5e8c191c2eb46c4c19fe1449ac4fc022d1e019f6 (patch)
tree650e6c54748042a8195c6b54b9a51ae7d9b24ad7
parent03f5cf3b9b759fbc8460d5ca3bf66a03490cdb74 (diff)
downloaddrakx-backup-do-not-use-5e8c191c2eb46c4c19fe1449ac4fc022d1e019f6.tar
drakx-backup-do-not-use-5e8c191c2eb46c4c19fe1449ac4fc022d1e019f6.tar.gz
drakx-backup-do-not-use-5e8c191c2eb46c4c19fe1449ac4fc022d1e019f6.tar.bz2
drakx-backup-do-not-use-5e8c191c2eb46c4c19fe1449ac4fc022d1e019f6.tar.xz
drakx-backup-do-not-use-5e8c191c2eb46c4c19fe1449ac4fc022d1e019f6.zip
SYS_umount does not exist on modern kernels and architectures like x86-64 :)
-rw-r--r--perl-install/fs.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 7eaf61711..43cf25319 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -737,7 +737,12 @@ sub umount {
my ($mntpoint) = @_;
$mntpoint =~ s|/$||;
log::l("calling umount($mntpoint)");
- syscall_('umount', $mntpoint) or die _("error unmounting %s: %s", $mntpoint, "$!");
+
+ # SYS_umount is not a valid sycall on modern kernels
+ (arch() =~ /x86_64/
+ ? syscall_('umount2', $mntpoint, 0)
+ : syscall_('umount', $mntpoint)
+ ) or die _("error unmounting %s: %s", $mntpoint, "$!");
substInFile { $_ = '' if /(^|\s)$mntpoint\s/ } '/etc/mtab'; #- don't care about error, if we can't read, we won't manage to write... (and mess mtab)
}