Skip to content

Commit 01ec549

Browse files
committed
Fix unmounting of dirs with backslash
1 parent f668ae1 commit 01ec549

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

atomic-update

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ from shlex import quote
2828
import xml.etree.ElementTree as ET
2929

3030
# Constants
31-
VERSION = "0.1.11"
31+
VERSION = "0.1.12"
3232
ZYPPER_PID_FILE = "/run/zypp.pid"
3333
VALID_CMD = ["dup", "run", "rollback"]
3434
VALID_OPT = ["--reboot", "--apply", "--shell", "--continue", "--no-verify", \
@@ -168,7 +168,7 @@ def cleanup():
168168
shell_exec(f"machinectl stop {container_id}")
169169
logging.debug("Cleaning up temp mounts...")
170170
umount_command = f"""
171-
LC_ALL=C mount -l | grep '{TMP_MOUNT_DIR}' | awk '{{print $3}}' | awk '{{print length, $0}}' | sort -rn | awk '{{print $2}}' | awk '{{system("umount " $0)}}';
171+
LC_ALL=C mount -l | grep '{TMP_MOUNT_DIR}' | awk '{{print $3}}' | awk '{{print length, $0}}' | sort -rn | awk '{{printf "\\047%s\\047\\n", $2}}' | awk '{{system("umount " $0)}}';
172172
"""
173173
while True:
174174
out, ret = shell_exec(umount_command)

0 commit comments

Comments
 (0)