diff options
| author | Andreas Müller <schnitzeltony@googlemail.com> | 2012-08-28 06:25:48 +0000 |
|---|---|---|
| committer | Eric Bénard <eric@eukrea.com> | 2012-09-02 15:03:00 +0200 |
| commit | 59c995359502910da4dd60fb53130c84b23d96e8 (patch) | |
| tree | 19d487c871652c7ce4f7808a056d991169447ba1 | |
| parent | 577943f85154be553b8133b3f2a13f53892152c4 (diff) | |
| download | meta-openembedded-59c995359502910da4dd60fb53130c84b23d96e8.tar.gz | |
systemd.bbclass: introduce SYSTEMD_AUTO_ENABLE variable
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: Eric Bénard <eric@eukrea.com>
| -rw-r--r-- | meta-oe/classes/systemd.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass index babe15e315..a2c8ddf0ec 100644 --- a/meta-oe/classes/systemd.bbclass +++ b/meta-oe/classes/systemd.bbclass | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | DEPENDS_append = " systemd-systemctl-native" | 1 | DEPENDS_append = " systemd-systemctl-native" |
| 2 | 2 | ||
| 3 | SYSTEMD_AUTO_ENABLE ??= "enable" | ||
| 4 | |||
| 3 | systemd_postinst() { | 5 | systemd_postinst() { |
| 4 | OPTS="" | 6 | OPTS="" |
| 5 | 7 | ||
| @@ -7,9 +9,9 @@ if [ -n "$D" ]; then | |||
| 7 | OPTS="--root=$D" | 9 | OPTS="--root=$D" |
| 8 | fi | 10 | fi |
| 9 | 11 | ||
| 10 | systemctl $OPTS enable ${SYSTEMD_SERVICE} | 12 | systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE} |
| 11 | 13 | ||
| 12 | if [ -z "$D" ]; then | 14 | if [ -z "$D" -a ${SYSTEMD_AUTO_ENABLE} = "enable" ]; then |
| 13 | systemctl start ${SYSTEMD_SERVICE} | 15 | systemctl start ${SYSTEMD_SERVICE} |
| 14 | fi | 16 | fi |
| 15 | } | 17 | } |
