[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.
main
Adriaan de Groot 6 years ago
parent 0c8257df3d
commit 2db3b413f4

@ -117,7 +117,7 @@ TemporaryMount::~TemporaryMount()
{ {
if ( m_d ) if ( m_d )
{ {
int r = unmount( m_d->m_devicePath, { "-R" } ); int r = unmount( m_d->m_mountDir.path(), { "-R" } );
if ( r ) if ( r )
{ {
cWarning() << "UnMount of temporary" << m_d->m_devicePath << "on" << m_d->m_mountDir.path() cWarning() << "UnMount of temporary" << m_d->m_devicePath << "on" << m_d->m_mountDir.path()

Loading…
Cancel
Save