summaryrefslogtreecommitdiff
path: root/src/rpm
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2022-12-03 20:27:47 +0800
committerMike Yuan <me@yhndnzj.com>2022-12-03 20:27:47 +0800
commit0acb1459a15f5b4d3a9bd2e7bf52661ca7bdebf0 (patch)
tree95f48c8f2d0088c9b569eb7d863b0779ad313017 /src/rpm
parent108d35ac7d435b4f1378a9c0fa50858263475e09 (diff)
downloadsystemd-0acb1459a15f5b4d3a9bd2e7bf52661ca7bdebf0.tar.gz
rpm/systemd-update-helper: use --no-warn when disabling units
Suppress the "empty [Install] section" warning (see #25437).
Diffstat (limited to 'src/rpm')
-rwxr-xr-xsrc/rpm/systemd-update-helper.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in
index ab8cdc0ff9..b35d952fab 100755
--- a/src/rpm/systemd-update-helper.in
+++ b/src/rpm/systemd-update-helper.in
@@ -19,21 +19,21 @@ case "$command" in
remove-system-units)
if [ -d /run/systemd/system ]; then
- systemctl --no-reload disable --now "$@"
+ systemctl --no-reload disable --now --no-warn "$@"
else
- systemctl --no-reload disable "$@"
+ systemctl --no-reload disable --no-warn "$@"
fi
;;
remove-user-units)
- systemctl --global disable "$@"
+ systemctl --global disable --no-warn "$@"
[ -d /run/systemd/system ] || exit 0
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
for user in $users; do
SYSTEMD_BUS_TIMEOUT={{UPDATE_HELPER_USER_TIMEOUT}} \
- systemctl --user -M "$user@" disable --now "$@" &
+ systemctl --user -M "$user@" disable --now --no-warn "$@" &
done
wait
;;