mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 02:22:15 +08:00
34 lines
813 B
Bash
34 lines
813 B
Bash
#!/bin/sh
|
|
|
|
sd_booted() {
|
|
[ -e sys/fs/cgroup/systemd ]
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
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
|
|
|
|
if sd_booted; then
|
|
systemctl --system daemon-reexec
|
|
systemctl restart systemd-logind.service
|
|
fi
|
|
|
|
}
|
|
|