17 Jan
2017
17 Jan
'17
11:09
http://bugzilla.opensuse.org/show_bug.cgi?id=1020301
http://bugzilla.opensuse.org/show_bug.cgi?id=1020301#c7
--- Comment #7 from Martin Wilck
Best way would probably be to disable restarting dbus.service and dbus.socket completely and only allow reloading. This would also affect the %postun in turn. However, I have no idea how to do that.
Like this, maybe?
%define _backup /etc/sysconfig/services.rpmbak.%{name}-%{version}-%{release}
%pre
if [[ "$FIRST_ARG" -gt 1 ]]; then
[...]
if [[ -f /etc/sysconfig/services ]]; then
cp -a /etc/sysconfig/services %{_backup}
else
touch %{_backup}
fi
cat >>/etc/sysconfig/services <