systemd/debian/systemd.postinst
2010-11-04 17:20:00 +01:00

22 lines
460 B
Bash

#! /bin/sh
set -e
if [ -n "$2" ]; then
systemctl daemon-reexec || true
if dpkg --compare-versions "$2" lt "11-2"; then
if [ -e /proc/mounts ]; then
mounts=$(awk '/ \/cgroup/ {print $2}' < /proc/mounts | sort -r)
for m in $mounts; do
umount "$m" || true;
done
fi
if [ -d /cgroup ]; then
rmdir --ignore-fail-on-non-empty /cgroup
fi
fi
fi
#DEBHELPER#