| # -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */ |
| # SPDX-License-Identifier: LGPL-2.1+ |
| # |
| # This file is part of systemd. |
| # Copyright © 2018 Neal Gompa |
| |
| # The contents of this are an example to be copied into systemd.spec. |
| # |
| # Minimum rpm version supported: 4.13.0 |
| |
| %transfiletriggerin -P 900900 -p <lua> |
| |
| |
| |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("%{_bindir}/systemctl", "daemon-reload")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerun -p <lua> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if posix.access("/run/systemd/system") then |
| posix.mkdir("%{_localstatedir}/lib") |
| posix.mkdir("%{_localstatedir}/lib/rpm-state") |
| posix.mkdir("%{_localstatedir}/lib/rpm-state/systemd") |
| io.open("%{_localstatedir}/lib/rpm-state/systemd/needs-reload", "w") |
| end |
| |
| %filetriggerpostun -P 1000100 -p <lua> |
| if posix.access("%{_localstatedir}/lib/rpm-state/systemd/needs-reload") then |
| posix.unlink("%{_localstatedir}/lib/rpm-state/systemd/needs-reload") |
| posix.rmdir("%{_localstatedir}/lib/rpm-state/systemd") |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("%{_bindir}/systemctl", "daemon-reload")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerin -P 100700 -p <lua> |
| |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("%{_bindir}/systemd-sysusers")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerin -P 100500 -p <lua> |
| |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("%{_bindir}/systemd-tmpfiles", "--create")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerin -p <lua> |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("%{_bindir}/systemd-hwdb", "update")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerin -p <lua> |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("%{_bindir}/journalctl", "--update-catalog")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerin -p <lua> |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("%{_bindir}/udevadm", "control", "--reload")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerin -p <lua> |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("@rootlibexecdir@/systemd-sysctl")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |
| |
| %transfiletriggerin -p <lua> |
| |
| |
| if posix.access("/run/systemd/system") then |
| pid = posix.fork() |
| if pid == 0 then |
| assert(posix.exec("@rootlibexecdir@/systemd-binfmt")) |
| elseif pid > 0 then |
| posix.wait(pid) |
| end |
| end |