systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst
PATCH 1/1 systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst
From: Li Zhijian <[email protected]>
If systemd_postinst is installed as a delayed package scriptlet (installed to /etc/rpm-postints/${PN}) which would be executed at the first time of OS startup. And then this script would block when it is trying to call systemctl to restart service.
It seems that it is not a good timing to restart service at run-postinsts. I test serval services which has supported systemd(uuidd/avahi-daemon), all of them will block the startup.
--- meta/classes/systemd.bbclass | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
meta/classes/systemd.bbclass +0 -4
@@ -31,10 +31,6 @@ fi if type systemctl >/dev/null 2>/dev/null; then systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} - - if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then - systemctl restart ${SYSTEMD_SERVICE} - fi fi } -- 1.7.1
Quoted 10 lines · Li Zhijian
From: Li Zhijian <[email protected]>
If
systemd_postinstis installed as a delayed package scriptlet (installed to/etc/rpm-postints/${PN}) which would be executed at the first time of OS startup. And then this script would block when it is trying to call systemctl to restart service.It seems that it is not a good timing to restart service at run-postinsts. I test serval services which has supported systemd(uuidd/avahi-daemon), all of them will block the startup.
Ross,
Can you have a look at this change.
Thanks
Sau!
Quoted 28 lines
Signed-off-by Li Zhijian <[email protected]>--- meta/classes/systemd.bbclass | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)meta/classes/systemd.bbclass +0
-4@@ -31,10 +31,6 @@ fi if type systemctl >/dev/null 2>/dev/null; then systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} - - if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then - systemctl restart ${SYSTEMD_SERVICE} - fi fi } -- 1.7.1_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Sau,Ross,
How about it
Signature · 2 lines
Best regards. Li Zhijian
|-----Original Message----- |From: Saul Wold [mailto:[email protected]] |Sent: Saturday, November 02, 2013 3:37 AM |To: Li Zhijian; [email protected]; Burton, Ross |Subject: Re: [OE-core] [PATCH] systemd.bbclass: do not call 'systemctl |restart ${SYSTEMD_SERVICE}' at systemd_postinst | |On 10/23/2013 12:34 AM, Li Zhijian wrote: |> From: Li Zhijian <[email protected]> |> |> If systemd_postinst is installed as a delayed package scriptlet (installed |to /etc/rpm-postints/${PN}) |> which would be executed at the first time of OS startup. And then this |script would block when it is |> trying to call systemctl to restart service. |> |> It seems that it is not a good timing to restart service at run-postinsts. |> I test serval services which has supported systemd(uuidd/avahi-daemon), |all of them |> will block the startup. |> | |Ross, | |Can you have a look at this change. | |Thanks | Sau! | | |> Signed-off-by: Li Zhijian <[email protected]> |> --- |> meta/classes/systemd.bbclass | 4 ---- |> 1 files changed, 0 insertions(+), 4 deletions(-) |> |> diff --git a/meta/classes/systemd.bbclass |b/meta/classes/systemd.bbclass |> index 3700b2e..7aa5459 100644 |> --- a/meta/classes/systemd.bbclass |> +++ b/meta/classes/systemd.bbclass |> @@ -31,10 +31,6 @@ fi |> if type systemctl >/dev/null 2>/dev/null; then |> systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} |> - |> - if [ -z "$D" -a "${SYSTEMD_AUTO_ENABLE}" = "enable" ]; then |> - systemctl restart ${SYSTEMD_SERVICE} |> - fi |> fi |> } |> -- 1.7.1 |> |> |> |> |> _______________________________________________ |> Openembedded-core mailing list |> [email protected] |> http://lists.openembedded.org/mailman/listinfo/openembedded-core |>