Merge "lvm-backup: Normalize path when comparing current path and mount point"

This commit is contained in:
Zuul 2018-10-25 07:13:57 +00:00 committed by Gerrit Code Review
commit 5ed2b00e72

View File

@ -303,7 +303,8 @@ def validate_lvm_params(backup_opt_dict):
def _umount(path): def _umount(path):
if os.getcwd().startswith(path): # Change dir if we are within the mount point to be removed.
if os.getcwd().startswith(os.path.normpath(path)):
os.chdir('/') os.chdir('/')
umount_proc = subprocess.Popen('{0} -l -f {1}'.format( umount_proc = subprocess.Popen('{0} -l -f {1}'.format(
utils.find_executable('umount'), path), utils.find_executable('umount'), path),