systat: systemd never enables the service
PATCH 1/1 systat: systemd never enables the service
Even if SYSTEMD_AUTO_ENABLE is set to "enable", the service is never activated by systemd. The cause is the postinst function in the recipe:
pkg_postinst_${PN} () {
if [ -n "$D" ]; then
exit 0
fi
if [ -e /etc/init.d/populate-volatile.sh ]; then
/etc/init.d/populate-volatile.sh update
fi
}
This generates with activated systemd the following postinst script:
set -e if [ -n "$D" ]; then exit 0 fi if [ -e /etc/init.d/populate-volatile.sh ]; then /etc/init.d/populate-volatile.sh update fi OPTS="" if [ -n "$D" ]; then OPTS="--root=$D" fi if type systemctl >/dev/null 2>/dev/null; then if [ -z "$D" ]; then systemctl daemon-reload fi systemctl $OPTS enable sysstat.service if [ -z "$D" -a "enable" = "enable" ]; then systemctl --no-block restart sysstat.service fi fi
Due to the exit statement, systemctl is never called and the service is never enabled in rootfs.
Invert the logic for the check to let run the rest of postinst script.
--- meta/recipes-extended/sysstat/sysstat.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
meta/recipes-extended/sysstat/sysstat.inc +5 -6
@@ -51,12 +51,11 @@ do_install() { } pkg_postinst_${PN} () { - if [ -n "$D" ]; then - exit 0 - fi - if [ -e /etc/init.d/populate-volatile.sh ]; then - /etc/init.d/populate-volatile.sh update - fi + if [ ! -n "$D" ]; then + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi + fi }
Signature · 1 line
2.17.1
this is wrong ml for this package, please send this to oe-core ml.
Quoted 79 lines · Stefano Babic
Even if
SYSTEMD_AUTO_ENABLEis set to "enable", the service is never activated by systemd. The cause is the postinst function in the recipe:pkg_postinst_${PN} () {
if [ -n "$D" ]; then
exit 0
fi
if [ -e/etc/init.d/populate-volatile.sh]; then
/etc/init.d/populate-volatile.shupdate
fi
}This generates with activated systemd the following postinst script:
set -e if [ -n "$D" ]; then exit 0 fi if [ -e /etc/init.d/populate-volatile.sh ]; then /etc/init.d/populate-volatile.sh update fi OPTS="" if [ -n "$D" ]; then OPTS="--root=$D" fi if type systemctl >/dev/null 2>/dev/null; then if [ -z "$D" ]; then systemctl daemon-reload fi systemctl $OPTS enable sysstat.service if [ -z "$D" -a "enable" = "enable" ]; then systemctl --no-block restart sysstat.service fi fiDue to the exit statement, systemctl is never called and the service is never enabled in rootfs.
Invert the logic for the check to let run the rest of postinst script.Signed-off-by Stefano Babic <[email protected]>--- meta/recipes-extended/sysstat/sysstat.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)meta/recipes-extended/sysstat/sysstat.inc +5
-7@@ -51,12 +51,11 @@ do_install() { } pkg_postinst_${PN} () { - if [ -n "$D" ]; then - exit 0 - fi - if [ -e /etc/init.d/populate-volatile.sh ]; then - /etc/init.d/populate-volatile.sh update - fi + if [ ! -n "$D" ]; then + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi + fi } --2.17.1
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Quoted 1 line · Khem Raj
this is wrong ml for this package, please send this to oe-core ml.
Ouch...thanks Khem, I will repost.
Stefano
Quoted 81 lines · Stefano Babic
Quoted 79 lines
Even if
SYSTEMD_AUTO_ENABLEis set to "enable", the service is never activated by systemd. The cause is the postinst function in the recipe:pkg_postinst_${PN} () {
if [ -n "$D" ]; then
exit 0
fi
if [ -e/etc/init.d/populate-volatile.sh]; then
/etc/init.d/populate-volatile.shupdate
fi
}This generates with activated systemd the following postinst script:
set -e if [ -n "$D" ]; then exit 0 fi if [ -e /etc/init.d/populate-volatile.sh ]; then /etc/init.d/populate-volatile.sh update fi OPTS="" if [ -n "$D" ]; then OPTS="--root=$D" fi if type systemctl >/dev/null 2>/dev/null; then if [ -z "$D" ]; then systemctl daemon-reload fi systemctl $OPTS enable sysstat.service if [ -z "$D" -a "enable" = "enable" ]; then systemctl --no-block restart sysstat.service fi fiDue to the exit statement, systemctl is never called and the service is never enabled in rootfs.
Invert the logic for the check to let run the rest of postinst script.Signed-off-by Stefano Babic <[email protected]>--- meta/recipes-extended/sysstat/sysstat.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)meta/recipes-extended/sysstat/sysstat.inc +5
-7@@ -51,12 +51,11 @@ do_install() { } pkg_postinst_${PN} () { - if [ -n "$D" ]; then - exit 0 - fi - if [ -e /etc/init.d/populate-volatile.sh ]; then - /etc/init.d/populate-volatile.sh update - fi + if [ ! -n "$D" ]; then + if [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi + fi } --2.17.1
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================