* Add Conflicts on klogd, since it doesn't work correctly with the
kmg→/dev/log bridge. Closes: #622555
* Add suggests on Python for systemd-analyze.
+ * Divert /lib/lsb/init-functions instead of (ab)using
+ /etc/lsb-base-logging.sh for diverting calls to /etc/init.d/*
+ * Remove obsolete conffile /etc/lsb-base-logging.sh. Closes: #619093
-- Tollef Fog Heen <tfheen@debian.org> Thu, 21 Apr 2011 13:50:13 +0200
# -*-Shell-script-*-
-# /etc/lsb-base-logging.sh
+# /lib/lsb/init-functions
if [ -e /sys/fs/cgroup/systemd ] ; then
-
# Some init scripts use "set -e" and "set -u", we don't want that
# here
set +e
# Redirect SysV init scripts when executed by the user
if [ $PPID -ne 1 ] && [ -z "$init" ] && [ -z "$_SYSTEMCTL_SKIP_REDIRECT" ] ; then
- case "$0" in
+ case $(readlink -f "$0") in
/etc/init.d/*)
# Don't redirect if the init script has X-Interactive: true
if ! grep -qs "^# X-Interactive:.*true" "$0"; then
_use_systemctl=1
fi
+ # Redirect if there's a matching .service file in /etc or /lib
+ local prog=${0##*/}
+ local service="${prog%.sh}.service"
+ local fp=$(systemctl -p FragmentPath show $service 2>/dev/null | sed 's/^FragmentPath=//')
+ case "$fp" in
+ /lib/systemd/system/*|/etc/systemd/system/*)
+ _use_systemctl=1
+ ;;
+ esac
;;
esac
else
exit $?
fi
fi
+
+. /lib/lsb/init-functions.systemd
systemd-machine-id-setup
+dpkg-maintscript-helper rm_conffile /etc/lsb-base-logging.sh 20-1 systemd -- "$@"
+
#DEBHELPER#
--- /dev/null
+#! /bin/sh
+
+set -e
+
+if [ "$1" = remove ]; then
+ dpkg-divert --remove --package systemd --rename \
+ --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
+fi
+
+dpkg-maintscript-helper rm_conffile /etc/lsb-base-logging.sh 20-1 systemd -- "$@"
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#! /bin/sh
+
+set -e
+
+if [ "$1" = install ] || [ "$1" = upgrade ]; then
+ dpkg-divert --add --package systemd --rename \
+ --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
+fi
+
+dpkg-maintscript-helper rm_conffile /etc/lsb-base-logging.sh 20-1 systemd -- "$@"
+
+#DEBHELPER#
+
+exit 0
\ No newline at end of file