core/systemd/systemd.install

34 lines
813 B
Plaintext
Raw Normal View History

2012-09-09 12:17:16 +08:00
#!/bin/sh
sd_booted() {
[ -e sys/fs/cgroup/systemd ]
}
2012-09-09 12:17:16 +08:00
post_install() {
udevadm hwdb --update
mv /etc/systemd/system/getty.target.wants/getty@tty1new.service /etc/systemd/system/getty.target.wants/getty@tty1.service
if sd_booted; then
systemctl --system daemon-reexec
fi
2012-09-09 12:17:16 +08:00
}
post_upgrade() {
udevadm hwdb --update
journalctl --update-catalog
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
2012-09-09 12:17:16 +08:00
if sd_booted; then
systemctl --system daemon-reexec
systemctl restart systemd-logind.service
2012-09-09 12:17:16 +08:00
fi
}