forked from pool/systemd
Accepting request 909721 from Base:System
- Avoid the error message when udev is updated due to udev being already active when the sockets are started again (bsc#1188291) OBS-URL: https://build.opensuse.org/request/show/909721 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=334
This commit is contained in:
parent
cff4d1a6d1
commit
f419cd2fdd
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 29 13:12:48 UTC 2021 - Franck Bui <fbui@suse.com>
|
||||||
|
|
||||||
|
- Avoid the error message when udev is updated due to udev being
|
||||||
|
already active when the sockets are started again (bsc#1188291)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 26 10:54:10 UTC 2021 - Franck Bui <fbui@suse.com>
|
Mon Jul 26 10:54:10 UTC 2021 - Franck Bui <fbui@suse.com>
|
||||||
|
|
||||||
|
@ -974,17 +974,21 @@ 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
|
||||||
systemctl daemon-reload || :
|
|
||||||
# On package update, restarting the socket units will probably fail as
|
# The order of the units being restarted is important here because there's currently no
|
||||||
# udevd is most likely running. Therefore systemctl will refuse to
|
# way to queue multiple jobs into a single transaction atomically. Therefore systemctl
|
||||||
# start them again once stopped. It's not an issue since we are mostly
|
# will create 3 restart jobs that can be handled by PID1 separately and if the jobs for
|
||||||
# interested to make PID1 use the updated unit files once the socket
|
# the sockets are being handled first then starting them again will fail as the service
|
||||||
# units wil be started again. And that will happen when systemd-udevd
|
# is still active hence the sockets held by udevd. However if the restart job for udevd
|
||||||
# itself will be restarted.
|
# is handled first, there should be enough time to queue the socket jobs before the stop
|
||||||
if [ $1 -ge 1 ]; then
|
# job for udevd is processed. Hence PID1 will automatically sort the restart jobs
|
||||||
systemctl try-restart systemd-udevd-{control,kernel}.socket 2>/dev/null || :
|
# correctly by stopping the service then the sockets and then by starting the sockets and
|
||||||
systemctl try-restart systemd-udevd.service || :
|
# the unit.
|
||||||
fi
|
#
|
||||||
|
# Note that when systemd-udevd is restarted, there will always be a short time
|
||||||
|
# frame where no socket will be listening to the events sent by the kernel, no
|
||||||
|
# matter if the socket unit is restarted in first or not.
|
||||||
|
%service_del_postun_with_restart systemd-udevd.service systemd-udevd-{control,kernel}.socket
|
||||||
|
|
||||||
%posttrans -n udev%{?mini}
|
%posttrans -n udev%{?mini}
|
||||||
%regenerate_initrd_posttrans
|
%regenerate_initrd_posttrans
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 29 13:12:48 UTC 2021 - Franck Bui <fbui@suse.com>
|
||||||
|
|
||||||
|
- Avoid the error message when udev is updated due to udev being
|
||||||
|
already active when the sockets are started again (bsc#1188291)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 26 10:54:10 UTC 2021 - Franck Bui <fbui@suse.com>
|
Mon Jul 26 10:54:10 UTC 2021 - Franck Bui <fbui@suse.com>
|
||||||
|
|
||||||
|
26
systemd.spec
26
systemd.spec
@ -972,17 +972,21 @@ 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
|
||||||
systemctl daemon-reload || :
|
|
||||||
# On package update, restarting the socket units will probably fail as
|
# The order of the units being restarted is important here because there's currently no
|
||||||
# udevd is most likely running. Therefore systemctl will refuse to
|
# way to queue multiple jobs into a single transaction atomically. Therefore systemctl
|
||||||
# start them again once stopped. It's not an issue since we are mostly
|
# will create 3 restart jobs that can be handled by PID1 separately and if the jobs for
|
||||||
# interested to make PID1 use the updated unit files once the socket
|
# the sockets are being handled first then starting them again will fail as the service
|
||||||
# units wil be started again. And that will happen when systemd-udevd
|
# is still active hence the sockets held by udevd. However if the restart job for udevd
|
||||||
# itself will be restarted.
|
# is handled first, there should be enough time to queue the socket jobs before the stop
|
||||||
if [ $1 -ge 1 ]; then
|
# job for udevd is processed. Hence PID1 will automatically sort the restart jobs
|
||||||
systemctl try-restart systemd-udevd-{control,kernel}.socket 2>/dev/null || :
|
# correctly by stopping the service then the sockets and then by starting the sockets and
|
||||||
systemctl try-restart systemd-udevd.service || :
|
# the unit.
|
||||||
fi
|
#
|
||||||
|
# Note that when systemd-udevd is restarted, there will always be a short time
|
||||||
|
# frame where no socket will be listening to the events sent by the kernel, no
|
||||||
|
# matter if the socket unit is restarted in first or not.
|
||||||
|
%service_del_postun_with_restart systemd-udevd.service systemd-udevd-{control,kernel}.socket
|
||||||
|
|
||||||
%posttrans -n udev%{?mini}
|
%posttrans -n udev%{?mini}
|
||||||
%regenerate_initrd_posttrans
|
%regenerate_initrd_posttrans
|
||||||
|
Loading…
Reference in New Issue
Block a user