void-packages/srcpkgs/elogind/files/elogind.wrapper

16 lines
388 B
Bash

#!/bin/sh
cgroup=/sys/fs/cgroup/elogind
mkdir -p "$cgroup"
if ! mountpoint "$cgroup" > /dev/null; then
mount -t cgroup -o none,name=elogind cgroup $cgroup || exit 1
fi
for tmpfs in /run/systemd /run/user; do
mountpoint "$tmpfs" > /dev/null && continue
mkdir -p "$tmpfs"
mount -t tmpfs -o nosuid,nodev,noexec,mode=0755 none "$tmpfs" || exit 1
done
exec /usr/libexec/elogind/elogind