mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-29 18:34:05 +00:00
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>
This commit is contained in:
parent
577943f851
commit
59c9953595
@ -1,5 +1,7 @@
|
|||||||
DEPENDS_append = " systemd-systemctl-native"
|
DEPENDS_append = " systemd-systemctl-native"
|
||||||
|
|
||||||
|
SYSTEMD_AUTO_ENABLE ??= "enable"
|
||||||
|
|
||||||
systemd_postinst() {
|
systemd_postinst() {
|
||||||
OPTS=""
|
OPTS=""
|
||||||
|
|
||||||
@ -7,9 +9,9 @@ if [ -n "$D" ]; then
|
|||||||
OPTS="--root=$D"
|
OPTS="--root=$D"
|
||||||
fi
|
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}
|
systemctl start ${SYSTEMD_SERVICE}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user