From 2db3b413f47c5420f0d86e3a08d0e7ccb40b825f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 24 Feb 2020 20:58:02 +0100 Subject: [PATCH] [libcalamares] Unmount with mount point, not device - The manpage for umount says that -R can only be used with a mount point (e.g. /usr/local) and not a device name; this makes sense because a device might be mounted in multiple locations, but the mountpoint (and things mounted under it) lives in the filesystem tree. - Existing code tried to unmount -R the device, not the mount point, and so always failed; leaving things mounted that shouldn't. --- src/libcalamares/partition/Mount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamares/partition/Mount.cpp b/src/libcalamares/partition/Mount.cpp index aa30c9d92..2bb49b0cb 100644 --- a/src/libcalamares/partition/Mount.cpp +++ b/src/libcalamares/partition/Mount.cpp @@ -117,7 +117,7 @@ TemporaryMount::~TemporaryMount() { if ( m_d ) { - int r = unmount( m_d->m_devicePath, { "-R" } ); + int r = unmount( m_d->m_mountDir.path(), { "-R" } ); if ( r ) { cWarning() << "UnMount of temporary" << m_d->m_devicePath << "on" << m_d->m_mountDir.path()