OCaml 4.14.0 rebuild
[arch-packages.git] / systemd / trunk / systemd.install
blob536e54d1b8a8970cab44a024b36a504e59709819
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 # group 'systemd-journal-remote' is created by systemd-sysusers
40 mkdir -m2755 var/log/journal/remote
41 chgrp systemd-journal-remote var/log/journal/remote
44 post_upgrade() {
45 post_common "$@"
47 if sd_booted; then
48 systemctl --system daemon-reexec
51 local v upgrades=(
52 242.0-2
55 for v in "${upgrades[@]}"; do
56 if [[ $(vercmp "$v" "$2") -eq 1 ]]; then
57 "_${v//[.-]/_}_changes"
59 done
62 # vim:set ts=2 sw=2 et: