Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst
@ 2013-10-23  7:34 Li Zhijian
  2013-11-01 19:36 ` Saul Wold
  0 siblings, 1 reply; 5+ messages in thread
From: Li Zhijian @ 2013-10-23  7:34 UTC (permalink / raw)
  To: openembedded-core

From: Li Zhijian <lizhijian@cn.fujitsu.com>

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.

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
 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






^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst
@ 2013-10-23 10:53 Yevhen Kyriukha
  2013-10-23 11:27 ` Li Zhijian
  0 siblings, 1 reply; 5+ messages in thread
From: Yevhen Kyriukha @ 2013-10-23 10:53 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

Current version of opkg has an issue with upgrading systemd services:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4213

Best regards,
Yevhen

[-- Attachment #2: Type: text/html, Size: 295 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst
  2013-10-23 10:53 [PATCH] systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst Yevhen Kyriukha
@ 2013-10-23 11:27 ` Li Zhijian
  0 siblings, 0 replies; 5+ messages in thread
From: Li Zhijian @ 2013-10-23 11:27 UTC (permalink / raw)
  To: Yevhen Kyriukha, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/html, Size: 2242 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst
  2013-10-23  7:34 Li Zhijian
@ 2013-11-01 19:36 ` Saul Wold
  2013-11-19  2:24   ` Li Zhijian
  0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2013-11-01 19:36 UTC (permalink / raw)
  To: Li Zhijian, openembedded-core, Burton, Ross

On 10/23/2013 12:34 AM, Li Zhijian wrote:
> From: Li Zhijian <lizhijian@cn.fujitsu.com>
>
> 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 <lizhijian@cn.fujitsu.com>
> ---
>   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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst
  2013-11-01 19:36 ` Saul Wold
@ 2013-11-19  2:24   ` Li Zhijian
  0 siblings, 0 replies; 5+ messages in thread
From: Li Zhijian @ 2013-11-19  2:24 UTC (permalink / raw)
  To: 'Saul Wold', openembedded-core, 'Burton, Ross'

Sau,Ross,

How about it

-- 
Best regards.
Li Zhijian 

 |-----Original Message-----
 |From: Saul Wold [mailto:sgw@linux.intel.com]
 |Sent: Saturday, November 02, 2013 3:37 AM
 |To: Li Zhijian; openembedded-core@lists.openembedded.org; 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 <lizhijian@cn.fujitsu.com>
 |>
 |> 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 <lizhijian@cn.fujitsu.com>
 |> ---
 |>   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
 |> Openembedded-core@lists.openembedded.org
 |> http://lists.openembedded.org/mailman/listinfo/openembedded-core
 |>





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-19  2:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 10:53 [PATCH] systemd.bbclass: do not call 'systemctl restart ${SYSTEMD_SERVICE}' at systemd_postinst Yevhen Kyriukha
2013-10-23 11:27 ` Li Zhijian
  -- strict thread matches above, loose matches on Subject: below --
2013-10-23  7:34 Li Zhijian
2013-11-01 19:36 ` Saul Wold
2013-11-19  2:24   ` Li Zhijian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox