app_containers: Rename the cleanup routine to cleanup()

exit is actually a keyword in bash
This commit is contained in:
Peter Cai 2022-12-31 15:22:16 -05:00
parent 8ce1f690b7
commit 19f37e343b

View file

@ -5,7 +5,7 @@ die() {
exit 1
}
exit() {
cleanup() {
rm -rf "$container_xdg_runtime"
# Remove the temporary facl-based permissions
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
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
# Note that the session itself must be bind-mounted first