#!/bin/sh
#
# Univention Setup
#  create /dev/shm for POSIX shared memory
#
# SPDX-FileCopyrightText: 2017-2025 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only

# POSIX shared memory objects are created (via shm_open) under /dev/shm or /run
# but /run is only writeable by root, therefore create /dev/shm as tmpfs with
# world-writeable permissions if it is missing

[ -d /dev/shm ] ||
	install -o root -g root -m 0755 -d /dev/shm
mountpoint /dev/shm ||
	mount -t tmpfs tmpfs /dev/shm
