mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Decode octal-escaped mountpoints and disown backgrounded restart
/proc/mounts uses octal escaping for special characters (e.g. \040 for spaces). Decode with printf before passing to fusermount so paths with spaces are handled correctly. Add disown after backgrounding the gvfs restart so it survives systemd-sleep's cgroup cleanup when the hook script exits.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
if [[ $1 == "pre" ]]; then
|
||||
while IFS=' ' read -r _ mountpoint fstype _; do
|
||||
if [[ $fstype == fuse.* ]]; then
|
||||
mountpoint=$(printf '%b' "$mountpoint")
|
||||
fusermount3 -uz "$mountpoint" 2>/dev/null || fusermount -uz "$mountpoint" 2>/dev/null || true
|
||||
fi
|
||||
done < /proc/mounts
|
||||
@@ -28,4 +29,5 @@ if [[ $1 == "post" ]]; then
|
||||
fi
|
||||
done
|
||||
) &
|
||||
disown
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user