Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 15 additions & 21 deletions src/rpm/triggers.systemd.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,37 +72,31 @@ end
-- This script will process files installed in {{SYSUSERS_DIR}} to create
-- specified users automatically. The priority is set such that it
-- will run before the tmpfiles file trigger.
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
assert(posix.execp("systemd-sysusers"))
elseif pid > 0 then
posix.wait(pid)
end
pid = posix.fork()
if pid == 0 then
assert(posix.execp("systemd-sysusers"))
elseif pid > 0 then
posix.wait(pid)
end

%transfiletriggerin -P 1000700 udev -p <lua> -- {{UDEV_HWDB_DIR}}
-- This script will automatically invoke hwdb update if files have been
-- installed or updated in {{UDEV_HWDB_DIR}}.
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
assert(posix.execp("systemd-hwdb", "update"))
elseif pid > 0 then
posix.wait(pid)
end
pid = posix.fork()
if pid == 0 then
assert(posix.execp("systemd-hwdb", "update"))
elseif pid > 0 then
posix.wait(pid)
end

%transfiletriggerin -P 1000700 -p <lua> -- {{SYSTEMD_CATALOG_DIR}}
-- This script will automatically invoke journal catalog update if files
-- have been installed or updated in {{SYSTEMD_CATALOG_DIR}}.
if posix.access("/run/systemd/system") then
pid = posix.fork()
if pid == 0 then
assert(posix.execp("journalctl", "--update-catalog"))
elseif pid > 0 then
posix.wait(pid)
end
pid = posix.fork()
if pid == 0 then
assert(posix.execp("journalctl", "--update-catalog"))
elseif pid > 0 then
posix.wait(pid)
end

%transfiletriggerin -P 1000700 -p <lua> -- {{BINFMT_DIR}}
Expand Down
12 changes: 3 additions & 9 deletions src/rpm/triggers.systemd.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,17 @@
# This script will process files installed in {{SYSUSERS_DIR}} to create
# specified users automatically. The priority is set such that it
# will run before the tmpfiles file trigger.
if test -d "/run/systemd/system"; then
systemd-sysusers || :
fi
systemd-sysusers || :

%transfiletriggerin -P 1000700 udev -- {{UDEV_HWDB_DIR}}
# This script will automatically invoke hwdb update if files have been
# installed or updated in {{UDEV_HWDB_DIR}}.
if test -d "/run/systemd/system"; then
systemd-hwdb update || :
fi
systemd-hwdb update || :

%transfiletriggerin -P 1000700 -- {{SYSTEMD_CATALOG_DIR}}
# This script will automatically invoke journal catalog update if files
# have been installed or updated in {{SYSTEMD_CATALOG_DIR}}.
if test -d "/run/systemd/system"; then
journalctl --update-catalog || :
fi
journalctl --update-catalog || :

%transfiletriggerin -P 1000700 -- {{BINFMT_DIR}}
# This script will automatically apply binfmt rules if files have been
Expand Down