SHA256
1
0
forked from pool/systemd

- Make sure the udev socket units are reloaded during udev package updates

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1139
This commit is contained in:
Franck Bui 2021-03-11 09:53:07 +00:00 committed by Git OBS Bridge
parent d86f2d4ef1
commit b7c785ac2b
4 changed files with 32 additions and 12 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 11 09:51:53 UTC 2021 - Franck Bui <fbui@suse.com>
- Make sure the udev socket units are reloaded during udev package updates
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 10 09:10:03 UTC 2021 - Franck Bui <fbui@suse.com> Wed Mar 10 09:10:03 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -903,12 +903,17 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
%postun -n udev%{?mini} %postun -n udev%{?mini}
%regenerate_initrd_post %regenerate_initrd_post
# Restarting udevd sockets means also stopping the daemon. But we systemctl daemon-reload || :
# don't want the sockets and the daemon to be inactive at the same # On package update, restarting the socket units will probably fail as
# time because we might loose new events sent by the kernel during the # udevd is most likely running. Therefore systemctl will refuse to
# package update otherwise. Hence we accept the fact that the socket # start them again once stopped. It's not an issue since we are mostly
# properties might not be updated. They are unlikely changed anyway. # interested to make PID1 use the updated unit files once the socket
%systemd_postun_with_restart systemd-udevd.service # units wil be started again. And that will happen when systemd-udevd
# itself will be restarted.
if [ $1 -ge 1 ]; then
systemctl try-restart systemd-udevd-{control,kernel}.socket 2>/dev/null || :
systemctl try-restart systemd-udevd.service || :
fi
%posttrans -n udev%{?mini} %posttrans -n udev%{?mini}
%regenerate_initrd_posttrans %regenerate_initrd_posttrans

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 11 09:51:53 UTC 2021 - Franck Bui <fbui@suse.com>
- Make sure the udev socket units are reloaded during udev package updates
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 10 09:10:03 UTC 2021 - Franck Bui <fbui@suse.com> Wed Mar 10 09:10:03 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -901,12 +901,17 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
%postun -n udev%{?mini} %postun -n udev%{?mini}
%regenerate_initrd_post %regenerate_initrd_post
# Restarting udevd sockets means also stopping the daemon. But we systemctl daemon-reload || :
# don't want the sockets and the daemon to be inactive at the same # On package update, restarting the socket units will probably fail as
# time because we might loose new events sent by the kernel during the # udevd is most likely running. Therefore systemctl will refuse to
# package update otherwise. Hence we accept the fact that the socket # start them again once stopped. It's not an issue since we are mostly
# properties might not be updated. They are unlikely changed anyway. # interested to make PID1 use the updated unit files once the socket
%systemd_postun_with_restart systemd-udevd.service # units wil be started again. And that will happen when systemd-udevd
# itself will be restarted.
if [ $1 -ge 1 ]; then
systemctl try-restart systemd-udevd-{control,kernel}.socket 2>/dev/null || :
systemctl try-restart systemd-udevd.service || :
fi
%posttrans -n udev%{?mini} %posttrans -n udev%{?mini}
%regenerate_initrd_posttrans %regenerate_initrd_posttrans