diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-07-07 14:02:36 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-07-21 10:57:35 +0200 |
commit | 7d9ee15d0fc2af87481ee371b278dbe7e68165ef (patch) | |
tree | cc851ed0146a0bf48f8b7eb682fa9afeeca44c68 /src/rpm/triggers.systemd.sh.in | |
parent | Merge pull request #20087 from xen0n/loongarch64-gpt (diff) | |
download | systemd-7d9ee15d0fc2af87481ee371b278dbe7e68165ef.tar.xz systemd-7d9ee15d0fc2af87481ee371b278dbe7e68165ef.zip |
rpm: don't specify the full path for systemctl and other commands
We can make things a bit simpler and more readable by not specifying the path.
Since we didn't specify the full path for all commands (including those invoked
recursively by anythign we invoke), this didn't really privide any security or
robustness benefits. I guess that full paths were used because this style of
rpm packagnig was popular in the past, with macros used for everything
possible, with special macros for common commands like %{__ln} and %{__mkdir}.
Diffstat (limited to '')
-rw-r--r-- | src/rpm/triggers.systemd.sh.in | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rpm/triggers.systemd.sh.in b/src/rpm/triggers.systemd.sh.in index 22abad9812..1631be18c9 100644 --- a/src/rpm/triggers.systemd.sh.in +++ b/src/rpm/triggers.systemd.sh.in @@ -15,8 +15,8 @@ # installed, because other cases are covered by the *un scriptlets, # so sometimes we will reload needlessly. if test -d "/run/systemd/system"; then - %{_bindir}/systemctl daemon-reload || : - %{_bindir}/systemctl reload-or-restart --marked || : + systemctl daemon-reload || : + systemctl reload-or-restart --marked || : fi %transfiletriggerpostun -P 1000100 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system @@ -26,13 +26,13 @@ fi # have been installed, but before %postun scripts in packages get # executed. if test -d "/run/systemd/system"; then - %{_bindir}/systemctl daemon-reload || : + systemctl daemon-reload || : fi %transfiletriggerpostun -P 10000 -- {{SYSTEM_DATA_UNIT_DIR}} /etc/systemd/system # We restart remaining services that should be restarted here. if test -d "/run/systemd/system"; then - %{_bindir}/systemctl reload-or-restart --marked || : + systemctl reload-or-restart --marked || : fi %transfiletriggerin -P 1000700 -- {{SYSUSERS_DIR}} @@ -40,21 +40,21 @@ fi # specified users automatically. The priority is set such that it # will run before the tmpfiles file trigger. if test -d "/run/systemd/system"; then - %{_bindir}/systemd-sysusers || : + systemd-sysusers || : fi %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 - %{_bindir}/systemd-hwdb update || : + systemd-hwdb update || : fi %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 - %{_bindir}/journalctl --update-catalog || : + journalctl --update-catalog || : fi %transfiletriggerin -P 1000700 -- {{BINFMT_DIR}} @@ -71,14 +71,14 @@ fi # tmpfiles automatically. The priority is set such that it will run # after the sysusers file trigger, but before any other triggers. if test -d "/run/systemd/system"; then - %{_bindir}/systemd-tmpfiles --create || : + systemd-tmpfiles --create || : fi %transfiletriggerin -P 1000600 udev -- {{UDEV_RULES_DIR}} # This script will automatically update udev with new rules if files # have been installed or updated in {{UDEV_RULES_DIR}}. if test -e /run/udev/control; then - %{_bindir}/udevadm control --reload || : + udevadm control --reload || : fi %transfiletriggerin -P 1000500 -- {{SYSCTL_DIR}} |