From: Mike Yuan Date: Sat, 3 Dec 2022 12:27:47 +0000 (+0800) Subject: rpm/systemd-update-helper: use --no-warn when disabling units X-Git-Tag: v253-rc1~373^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F25437%2Fhead;p=thirdparty%2Fsystemd.git rpm/systemd-update-helper: use --no-warn when disabling units Suppress the "empty [Install] section" warning (see #25437). --- diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in index ab8cdc0ff96..b35d952fab0 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 ;;