archrelease: copy trunk to extra-x86_64
[arch-packages.git] / systemd / trunk / systemd.install
blobcece9d2dea25a552c6adf9256a675514490a51f0
1 #!/bin/bash
3 sd_booted() {
4 [[ -d run/systemd/system && ! -L run/systemd/system ]]
7 add_journal_acls() {
8 # ignore errors, since the filesystem might not support ACLs
9 setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2>/dev/null
13 post_common() {
14 systemd-sysusers
15 journalctl --update-catalog
18 _242_0_2_changes() {
19 if [[ -L var/lib/systemd/timesync ]]; then
20 rm var/lib/systemd/timesync
21 if [[ -d var/lib/private/systemd/timesync ]]; then
22 mv var/lib/{private/,}systemd/timesync
27 post_install() {
28 systemd-machine-id-setup
30 post_common "$@"
32 add_journal_acls
34 # enable some services by default, but don't track them
35 systemctl enable \
36 getty@tty1.service \
37 remote-fs.target
39 echo ":: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your"
40 echo " bootloader to replace sysvinit with systemd, or install systemd-sysvcompat"
42 # group 'systemd-journal-remote' is created by systemd-sysusers
43 mkdir -m2755 var/log/journal/remote
44 chgrp systemd-journal-remote var/log/journal/remote
47 post_upgrade() {
48 post_common "$@"
50 if sd_booted; then
51 systemctl --system daemon-reexec
54 local v upgrades=(
55 242.0-2
58 for v in "${upgrades[@]}"; do
59 if [[ $(vercmp "$v" "$2") -eq 1 ]]; then
60 "_${v//[.-]/_}_changes"
62 done
65 # vim:set ts=2 sw=2 et: