#!/bin/sh set -e _systemctl() { if [ -d /run/systemd/system ]; then systemctl "$@" fi } _update_catalog() { journalctl --update-catalog || true } # Update Message Catalogs database in response to dpkg trigger if [ "$1" = "triggered" ]; then _update_catalog exit 0 fi # Enable getty and remote-fs.target by default on new installs if [ -z "$2" ]; then systemctl enable getty@tty1.service || true systemctl enable remote-fs.target || true fi # Enable systemd-pstore by default on new installs and upgrades, see #952767 if dpkg --compare-versions "$2" lt "245.4-4~"; then systemctl enable systemd-pstore.service || true fi # Do a one-time migration of the local time setting if [ -z "$2" ]; then if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi if [ "$UTC" = "no" ] && [ ! -e /etc/adjtime ]; then printf "0.0 0 0.0\n0\nLOCAL\n" > /etc/adjtime fi fi # Do a one-time migration of the TMPTIME setting if [ -z "$2" ]; then if [ -f /etc/default/rcS ]; then . /etc/default/rcS fi if [ ! -e /etc/tmpfiles.d/tmp.conf ]; then case "$TMPTIME" in -*|infinite|infinity) cat > /etc/tmpfiles.d/tmp.conf </dev/null; then delgroup --system nobody || true fi fi if dpkg --compare-versions "$2" lt-nl "245.4-4~"; then # systemd-pstore.service is now enabled via sysinit.target rm -f /etc/systemd/system/systemd-remount-fs.service.wants/systemd-pstore.service rmdir --ignore-fail-on-non-empty /etc/systemd/system/systemd-remount-fs.service.wants 2> /dev/null || true fi if dpkg --compare-versions "$2" lt-nl "245.4-5~"; then # Clean up removed ondemand service rm -f /etc/systemd/system/multi-user.target.wants/ondemand.service fi # Automatically added by dh_installtmpfiles/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # In case this system is running systemd, we need to ensure that all # necessary tmpfiles (if any) are created before starting. if [ -d /run/systemd/system ] ; then systemd-tmpfiles --create debian.conf home.conf journal-nocow.conf legacy.conf systemd-nologin.conf systemd-pstore.conf systemd-tmp.conf systemd.conf tmp.conf var.conf x11.conf >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installdeb/13.3.4 dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.hostname1.conf 233-3\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.locale1.conf 233-3\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.login1.conf 233-3\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.machine1.conf 228-5\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.network1.conf 233-3\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.resolve1.conf 233-3\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.systemd1.conf 233-3\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.timedate1.conf 233-3\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.systemd-shim.conf 239-15\~ systemd-shim -- "$@" dpkg-maintscript-helper rm_conffile /etc/dhcp/dhclient-exit-hooks.d/timesyncd 245.4-2\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/systemd/timesyncd.conf 245.4-2\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/pam.d/systemd-user 247\~rc2-3\~ -- "$@" # End automatically added section