systemd/debian/systemd.postinst

26 lines
569 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
systemd-machine-id-setup
dpkg-maintscript-helper rm_conffile /etc/lsb-base-logging.sh 20-1 systemd -- "$@"
#DEBHELPER#