!19 [sync] PR-17: 优化dbus-broker的安装卸载脚本
From: @openeuler-sync-bot Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
dbd941da09
@ -1,6 +1,6 @@
|
||||
Name: dbus-broker
|
||||
Version: 29
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Linux D-Bus Message Broker
|
||||
License: Apache License 2.0
|
||||
URL: https://github.com/bus1/dbus-broker
|
||||
@ -53,15 +53,22 @@ if ! getent passwd dbus > /dev/null ; then
|
||||
fi
|
||||
|
||||
%preun
|
||||
%systemd_preun dbus-broker.service
|
||||
%systemd_user_preun dbus-broker.service
|
||||
# Disable and stop dbus-broker.service after pre uninstalling
|
||||
if [ $1 == 0 ] && [ -x /usr/bin/systemctl ]; then
|
||||
systemctl disable dbus-broker.service &>/dev/null || :
|
||||
systemctl reset-failed dbus-broker.service &>/dev/null || :
|
||||
systemctl stop dbus-broker.service &>/dev/null || :
|
||||
fi
|
||||
|
||||
%post
|
||||
%systemd_post dbus-broker.service
|
||||
%systemd_user_post dbus-broker.service
|
||||
# Enable after installing
|
||||
if [ $1 == 1 ] && [ -x /usr/bin/systemctl ]; then
|
||||
systemctl --no-reload enable dbus-broker.service &>/dev/null || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
%systemd_postun dbus-broker.service
|
||||
%systemd_user_postun dbus-broker.service
|
||||
|
||||
%files
|
||||
@ -74,6 +81,9 @@ fi
|
||||
%{_userunitdir}/dbus-broker.service
|
||||
|
||||
%changelog
|
||||
* Thu Dec 01 2022 licunlong<licunlong1@huawei.com> - 29-5
|
||||
- Optimize installing and removing dbus-broker
|
||||
|
||||
* Tue Nov 22 2022 hongjinghao<hongjinghao@huawei.com> - 29-4
|
||||
- Fix CVE-2022-31212 and CVE-31213
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user