diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-05 17:03:43 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-15 20:49:14 +0100 |
commit | cd621954ed643c6ee0d869132293e26056a48826 (patch) | |
tree | f163a60466403ef7a72034962182427ef84bb748 /src/rpm/triggers.systemd.in | |
parent | b492db99d60ac0f0403decb3d291d3ddcc435db6 (diff) | |
download | systemd-cd621954ed643c6ee0d869132293e26056a48826.tar.gz |
rpm: order sysctl/sysusers/tmpfiles execution before package scriptlets
P>1000000 is *before* "normal" scriptlets, P<1000000 is *after*. I think it
makes sense to do stuff like execution of sysctl/sysusers/tmpfiles configuration
before package scriptlets. I think that was the intent, but a single digit got
dropped ;(
Also, let's reorder the scriptlets in the file to match execution order, to
make it easier to see what is going on.
Most of those may happen in any order, but there are some exceptions:
tmpfiles should be after sysusers,
udevadm --reload should be after hwdb.
Diffstat (limited to 'src/rpm/triggers.systemd.in')
-rw-r--r-- | src/rpm/triggers.systemd.in | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/rpm/triggers.systemd.in b/src/rpm/triggers.systemd.in index 1e925cf974..37f62cb1b7 100644 --- a/src/rpm/triggers.systemd.in +++ b/src/rpm/triggers.systemd.in @@ -50,74 +50,74 @@ if posix.access("/run/systemd/system") then end end -%transfiletriggerin -P 100500 -p <lua> -- @tmpfilesdir@ --- This script will process files installed in @tmpfilesdir@ to create --- tmpfiles automatically. The priority is set such that it will run --- after the sysusers file trigger, but before any other triggers. +%transfiletriggerin -P 1000700 udev -p <lua> -- @udevhwdbdir@ +-- This script will automatically invoke hwdb update if files have been +-- installed or updated in @udevhwdbdir@. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("%{_bindir}/systemd-tmpfiles", "--create")) + assert(posix.exec("%{_bindir}/systemd-hwdb", "update")) elseif pid > 0 then posix.wait(pid) end end -%transfiletriggerin udev -p <lua> -- @udevhwdbdir@ --- This script will automatically invoke hwdb update if files have been --- installed or updated in @udevhwdbdir@. +%transfiletriggerin -P 1000700 -p <lua> -- @catalogdir@ +-- This script will automatically invoke journal catalog update if files +-- have been installed or updated in @catalogdir@. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("%{_bindir}/systemd-hwdb", "update")) + assert(posix.exec("%{_bindir}/journalctl", "--update-catalog")) elseif pid > 0 then posix.wait(pid) end end -%transfiletriggerin -p <lua> -- @catalogdir@ --- This script will automatically invoke journal catalog update if files --- have been installed or updated in @catalogdir@. +%transfiletriggerin -P 1000700 -p <lua> -- @binfmtdir@ +-- This script will automatically apply binfmt rules if files have been +-- installed or updated in @binfmtdir@. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("%{_bindir}/journalctl", "--update-catalog")) + assert(posix.exec("@rootlibexecdir@/systemd-binfmt")) elseif pid > 0 then posix.wait(pid) end end -%transfiletriggerin udev -p <lua> -- @udevrulesdir@ --- This script will automatically update udev with new rules if files --- have been installed or updated in @udevrulesdir@. +%transfiletriggerin -P 1000600 -p <lua> -- @tmpfilesdir@ +-- This script will process files installed in @tmpfilesdir@ to create +-- tmpfiles automatically. The priority is set such that it will run +-- after the sysusers file trigger, but before any other triggers. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("%{_bindir}/udevadm", "control", "--reload")) + assert(posix.exec("%{_bindir}/systemd-tmpfiles", "--create")) elseif pid > 0 then posix.wait(pid) end end -%transfiletriggerin -p <lua> -- @sysctldir@ --- This script will automatically apply sysctl rules if files have been --- installed or updated in @sysctldir@. +%transfiletriggerin -P 1000600 udev -p <lua> -- @udevrulesdir@ +-- This script will automatically update udev with new rules if files +-- have been installed or updated in @udevrulesdir@. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("@rootlibexecdir@/systemd-sysctl")) + assert(posix.exec("%{_bindir}/udevadm", "control", "--reload")) elseif pid > 0 then posix.wait(pid) end end -%transfiletriggerin -p <lua> -- @binfmtdir@ --- This script will automatically apply binfmt rules if files have been --- installed or updated in @binfmtdir@. +%transfiletriggerin -P 1000500 -p <lua> -- @sysctldir@ +-- This script will automatically apply sysctl rules if files have been +-- installed or updated in @sysctldir@. if posix.access("/run/systemd/system") then pid = posix.fork() if pid == 0 then - assert(posix.exec("@rootlibexecdir@/systemd-binfmt")) + assert(posix.exec("@rootlibexecdir@/systemd-sysctl")) elseif pid > 0 then posix.wait(pid) end |