systemd/debian/systemd.prerm
Michael Biebl 10952c547d Update the checks which test if systemd is the active init.
The recommended check is [ -d /run/systemd/system ] as this will also
work with a standalone systemd-logind.
2013-06-20 01:17:00 +02:00

16 lines
292 B
Bash

#! /bin/sh
set -e
#
# Prevent systemd from being removed if it's the active init. That
# will not work.
#
if [ "$1" = "remove" ] && [ -d /run/systemd/system ]; then
echo "systemd is the active init system, please switch to another before removing systemd."
exit 1
fi
#DEBHELPER#