app_containers: Rename the cleanup routine to cleanup()
exit is actually a keyword in bash
This commit is contained in:
parent
8ce1f690b7
commit
19f37e343b
|
@ -5,7 +5,7 @@ die() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
exit() {
|
cleanup() {
|
||||||
rm -rf "$container_xdg_runtime"
|
rm -rf "$container_xdg_runtime"
|
||||||
# Remove the temporary facl-based permissions
|
# Remove the temporary facl-based permissions
|
||||||
setfacl -x u:$((user_on_host)) $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY
|
setfacl -x u:$((user_on_host)) $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY
|
||||||
|
@ -31,7 +31,7 @@ fi
|
||||||
|
|
||||||
# Create a XDG_RUNTIME_DIR for guest on host
|
# Create a XDG_RUNTIME_DIR for guest on host
|
||||||
container_xdg_runtime="$(mktemp -d -p /var/tmp)"
|
container_xdg_runtime="$(mktemp -d -p /var/tmp)"
|
||||||
trap exit EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
# Link the current wayland session to the container's xdg runtime
|
# Link the current wayland session to the container's xdg runtime
|
||||||
# Note that the session itself must be bind-mounted first
|
# Note that the session itself must be bind-mounted first
|
||||||
|
|
Loading…
Reference in a new issue