- 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:
parent
d86f2d4ef1
commit
b7c785ac2b
@ -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>
|
||||
|
||||
|
@ -903,12 +903,17 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
|
||||
|
||||
%postun -n udev%{?mini}
|
||||
%regenerate_initrd_post
|
||||
# Restarting udevd sockets means also stopping the daemon. But we
|
||||
# don't want the sockets and the daemon to be inactive at the same
|
||||
# time because we might loose new events sent by the kernel during the
|
||||
# package update otherwise. Hence we accept the fact that the socket
|
||||
# properties might not be updated. They are unlikely changed anyway.
|
||||
%systemd_postun_with_restart systemd-udevd.service
|
||||
systemctl daemon-reload || :
|
||||
# On package update, restarting the socket units will probably fail as
|
||||
# udevd is most likely running. Therefore systemctl will refuse to
|
||||
# start them again once stopped. It's not an issue since we are mostly
|
||||
# interested to make PID1 use the updated unit files once the socket
|
||||
# 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}
|
||||
%regenerate_initrd_posttrans
|
||||
|
@ -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>
|
||||
|
||||
|
17
systemd.spec
17
systemd.spec
@ -901,12 +901,17 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
|
||||
|
||||
%postun -n udev%{?mini}
|
||||
%regenerate_initrd_post
|
||||
# Restarting udevd sockets means also stopping the daemon. But we
|
||||
# don't want the sockets and the daemon to be inactive at the same
|
||||
# time because we might loose new events sent by the kernel during the
|
||||
# package update otherwise. Hence we accept the fact that the socket
|
||||
# properties might not be updated. They are unlikely changed anyway.
|
||||
%systemd_postun_with_restart systemd-udevd.service
|
||||
systemctl daemon-reload || :
|
||||
# On package update, restarting the socket units will probably fail as
|
||||
# udevd is most likely running. Therefore systemctl will refuse to
|
||||
# start them again once stopped. It's not an issue since we are mostly
|
||||
# interested to make PID1 use the updated unit files once the socket
|
||||
# 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}
|
||||
%regenerate_initrd_posttrans
|
||||
|
Loading…
Reference in New Issue
Block a user