mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 14:40:31 +00:00
rpm/systemd-update-helper: use --no-warn when disabling units
Suppress the "empty [Install] section" warning (see #25437).
This commit is contained 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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user