All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-system 0/2] Introduce SYSTEMD_AUTO_ENABLE
@ 2012-07-13 11:10 Andreas Müller
  2012-07-13 11:10 ` [meta-system 1/2] systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable Andreas Müller
  2012-07-13 11:10 ` [meta-system 2/2] udisks: do not start daemon automatically at boot time Andreas Müller
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Müller @ 2012-07-13 11:10 UTC (permalink / raw)
  To: openembedded-devel

This patch series was created on top of the "transition" series and was pushed
to git://gitorious.org/schnitzeltony-oe-meta/meta-openembedded-systemd.git. It
was build tested only assuming systemctl-native's implementation of 'disable'
parameter works properly.

Andreas Müller (2):
  systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable
  udisks: do not start daemon automatically at boot time

 meta-systemd/classes/systemd.bbclass               |    6 ++++--
 .../recipes-support/udisks/udisks_1.0.4.bbappend   |    3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

-- 
1.7.6.5




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

* [meta-system 1/2] systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable
  2012-07-13 11:10 [meta-system 0/2] Introduce SYSTEMD_AUTO_ENABLE Andreas Müller
@ 2012-07-13 11:10 ` Andreas Müller
  2012-07-13 15:28   ` Otavio Salvador
  2012-07-13 11:10 ` [meta-system 2/2] udisks: do not start daemon automatically at boot time Andreas Müller
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Müller @ 2012-07-13 11:10 UTC (permalink / raw)
  To: openembedded-devel

Currently all services introduced are enabled and started at installation. By
setting SYSTEMD_AUTO_ENABLE = "disable" the default behaviour can be
overridden.

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta-systemd/classes/systemd.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-systemd/classes/systemd.bbclass b/meta-systemd/classes/systemd.bbclass
index 8af0d58..38b9ed5 100644
--- a/meta-systemd/classes/systemd.bbclass
+++ b/meta-systemd/classes/systemd.bbclass
@@ -1,5 +1,7 @@
 DEPENDS_append = " systemd-systemctl-native"
 
+SYSTEMD_AUTO_ENABLE ??= "enable"
+
 systemd_postinst() {
 OPTS=""
 
@@ -7,9 +9,9 @@ if [ -n "$D" ]; then
     OPTS="--root=$D"
 fi
 
-systemctl $OPTS enable ${SYSTEMD_SERVICE}
+systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
 
-if [ -z "$D" ]; then
+if [ -z "$D" -a ${SYSTEMD_AUTO_ENABLE} = "enable" ]; then
     systemctl start ${SYSTEMD_SERVICE}
 fi
 }
-- 
1.7.6.5




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

* [meta-system 2/2] udisks: do not start daemon automatically at boot time
  2012-07-13 11:10 [meta-system 0/2] Introduce SYSTEMD_AUTO_ENABLE Andreas Müller
  2012-07-13 11:10 ` [meta-system 1/2] systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable Andreas Müller
@ 2012-07-13 11:10 ` Andreas Müller
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Müller @ 2012-07-13 11:10 UTC (permalink / raw)
  To: openembedded-devel


Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../recipes-support/udisks/udisks_1.0.4.bbappend   |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta-systemd/meta-oe/recipes-support/udisks/udisks_1.0.4.bbappend b/meta-systemd/meta-oe/recipes-support/udisks/udisks_1.0.4.bbappend
index f6470c9..9d0f18c 100644
--- a/meta-systemd/meta-oe/recipes-support/udisks/udisks_1.0.4.bbappend
+++ b/meta-systemd/meta-oe/recipes-support/udisks/udisks_1.0.4.bbappend
@@ -1,6 +1,6 @@
 inherit systemd
 
-PRINC := "${@int(PRINC) + 1}"
+PRINC := "${@int(PRINC) + 2}"
 
 # look for files in the layer first
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -11,3 +11,4 @@ SRC_URI += "file://add-systemd-support.patch"
 
 SYSTEMD_PACKAGES = "${PN}-systemd"
 SYSTEMD_SERVICE_${PN}-systemd = "udisks-daemon.service"
+SYSTEMD_AUTO_ENABLE = "disable"
-- 
1.7.6.5




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

* Re: [meta-system 1/2] systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable
  2012-07-13 11:10 ` [meta-system 1/2] systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable Andreas Müller
@ 2012-07-13 15:28   ` Otavio Salvador
  2012-07-13 21:18     ` Andreas Müller
  0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2012-07-13 15:28 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 13, 2012 at 8:10 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> Currently all services introduced are enabled and started at installation. By
> setting SYSTEMD_AUTO_ENABLE = "disable" the default behaviour can be
> overridden.

I like the idea but this might be nicer to have it by image; we could
check, in postinst, for:

$SYSTEMD_ENABLE at runtime, so we can set it in image file.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

* Re: [meta-system 1/2] systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable
  2012-07-13 15:28   ` Otavio Salvador
@ 2012-07-13 21:18     ` Andreas Müller
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Müller @ 2012-07-13 21:18 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Jul 13, 2012 at 5:28 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> On Fri, Jul 13, 2012 at 8:10 AM, Andreas Müller
> <schnitzeltony@googlemail.com> wrote:
>> Currently all services introduced are enabled and started at installation. By
>> setting SYSTEMD_AUTO_ENABLE = "disable" the default behaviour can be
>> overridden.
>
> I like the idea but this might be nicer to have it by image; we could
> check, in postinst, for:
>
> $SYSTEMD_ENABLE at runtime, so we can set it in image file.
>
If I understand you correct, you suggest an image global for this?
From my point of view we then put things together which we shouldn't.
For instance: my preferred next candidate would be gateone. Nice to
have on the machine but not mandatory to start at every boot. It takes
long time and is more a on demand thing. What do gateone and udisks
share in common?

Andreas



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

end of thread, other threads:[~2012-07-13 21:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-13 11:10 [meta-system 0/2] Introduce SYSTEMD_AUTO_ENABLE Andreas Müller
2012-07-13 11:10 ` [meta-system 1/2] systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable Andreas Müller
2012-07-13 15:28   ` Otavio Salvador
2012-07-13 21:18     ` Andreas Müller
2012-07-13 11:10 ` [meta-system 2/2] udisks: do not start daemon automatically at boot time Andreas Müller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.