dbus: move systemd-hooks for dbus.socket to 'dbus-common'
The systemd_{post,postun,preun,..} hooks should be called in the package that actually provides the given files. There is no harm in calling these in the dbus-daemon package, but preferably we don't. Move this to 'dbus-common' for dbus.socket, since dbus.socket is provided by it. This makes sure the unit is properly enabled/disabled even without the dbus-daemon package installed. Note that it is safe to enable/disable dbus.socket even without a dbus.service around. systemd can deal with this just fine, and only ever actually pulls in the socket if an activatable service is around. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
b8679ce6a8
commit
235a81bfa5
24
dbus.spec
24
dbus.spec
@ -310,19 +310,31 @@ popd
|
|||||||
/usr/sbin/useradd -c 'System message bus' -u %{dbus_user_uid} -g %{dbus_user_uid} \
|
/usr/sbin/useradd -c 'System message bus' -u %{dbus_user_uid} -g %{dbus_user_uid} \
|
||||||
-s /sbin/nologin -r -d '/' dbus 2> /dev/null || :
|
-s /sbin/nologin -r -d '/' dbus 2> /dev/null || :
|
||||||
|
|
||||||
|
%post common
|
||||||
|
%systemd_post dbus.socket
|
||||||
|
%systemd_user_post dbus.socket
|
||||||
|
|
||||||
%post daemon
|
%post daemon
|
||||||
%systemd_post dbus-daemon.service dbus.socket
|
%systemd_post dbus-daemon.service
|
||||||
%systemd_user_post dbus-daemon.service dbus.socket
|
%systemd_user_post dbus-daemon.service
|
||||||
|
|
||||||
%post libs -p /sbin/ldconfig
|
%post libs -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%preun common
|
||||||
|
%systemd_preun dbus.socket
|
||||||
|
%systemd_user_preun dbus.socket
|
||||||
|
|
||||||
%preun daemon
|
%preun daemon
|
||||||
%systemd_preun dbus-daemon.service dbus.socket
|
%systemd_preun dbus-daemon.service
|
||||||
%systemd_user_preun dbus-daemon.service dbus.socket
|
%systemd_user_preun dbus-daemon.service
|
||||||
|
|
||||||
|
%postun common
|
||||||
|
%systemd_postun dbus.socket
|
||||||
|
%systemd_user_postun dbus.socket
|
||||||
|
|
||||||
%postun daemon
|
%postun daemon
|
||||||
%systemd_postun dbus-daemon.service dbus.socket
|
%systemd_postun dbus-daemon.service
|
||||||
%systemd_user_postun dbus-daemon.service dbus.socket
|
%systemd_user_postun dbus-daemon.service
|
||||||
|
|
||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user