#!/bin/sh sd_booted() { [ -e sys/fs/cgroup/systemd ] } post_install() { udevadm hwdb --update if sd_booted; then systemctl --system daemon-reexec fi } post_upgrade() { udevadm hwdb --update journalctl --update-catalog if [ "$(vercmp 196 "$2")" -eq 1 ]; then mv /etc/systemd/system/getty.target.wants/getty@tty1.service /etc/systemd/system/getty.target.wants/getty@tty1.service.pacsave mv /etc/systemd/system/getty.target.wants/getty@tty1new.service /etc/systemd/system/getty.target.wants/getty@tty1.service rm /etc/systemd/system/getty.target.wants/getty@tty1.service.pacsave fi if sd_booted; then systemctl --system daemon-reexec systemctl restart systemd-logind.service fi }