systemd getty .service automated removal/upgrade

This commit is contained in:
abveritas 2012-11-21 23:30:08 +00:00
parent d1032a23f8
commit a6bcda1ff2
2 changed files with 12 additions and 4 deletions

View File

@ -12,9 +12,8 @@ license=('GPL2' 'LGPL2.1' 'MIT')
depends=('acl' 'bash' 'glibc' 'glib2' 'kmod' 'hwids' 'util-linux' 'kbd' 'kmod' 'libcap' 'libxslt'
'linux-api-headers' 'pam' 'xz' 'libgcrypt' 'dbus-core')
makedepends=('docbook-xsl' 'gobject-introspection' 'gperf' 'intltool')
optdepends=('python2-cairo: systemd-analyze'
'dbus-python: systemd-analyze'
'python2-gobject3: systemd-analyze')
optdepends=('python2-gobject3: systemd-analyze'
'dbus-python: systemd-analyze')
backup=(etc/dbus-1/system.d/org.freedesktop.systemd1.conf
etc/dbus-1/system.d/org.freedesktop.hostname1.conf
etc/dbus-1/system.d/org.freedesktop.login1.conf
@ -117,6 +116,8 @@ package() {
# Make journalctl persistent
install -dm755 "$pkgdir/var/log/journal"
sed -i -e 's/#SystemMaxUse=/SystemMaxUse=25M/' ${pkgdir}/etc/systemd/journald.conf
# Moving previous .install enabled file, remove with #197
mv "$pkgdir/etc/systemd/system/getty.target.wants/getty@tty1.service" "$pkgdir/etc/systemd/system/getty.target.wants/getty@tty1new.service"
}

View File

@ -3,7 +3,7 @@
sd_booted() {
[ -e sys/fs/cgroup/systemd ]
}
post_install() {
udevadm hwdb --update
@ -16,6 +16,13 @@ post_install() {
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
fi
if sd_booted; then
systemctl --system daemon-reexec
systemctl restart systemd-logind.service