diff options
author | Adam Miartus <adam.miartus@softhows.eu> | 2020-05-28 15:28:54 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-06-08 13:58:03 -0700 |
commit | 50b650bbeff160e236b7e1421052161490e36df6 (patch) | |
tree | 24ce772ed2965dbede976b9c559c51aaea4f91b3 | |
parent | 03886017a97a154aa8828fc3984405505486aed9 (diff) | |
download | meta-openembedded-contrib-50b650bbeff160e236b7e1421052161490e36df6.tar.gz |
meta-oe toybox-inittab: allow getty as a packageconfig feature
Signed-off-by: Adam Miartus <adam.miartus@softhows.eu>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb b/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb index 5e5a10b896..8d7ff61e86 100644 --- a/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb +++ b/meta-oe/recipes-core/toybox/toybox-inittab_0.8.2.bb @@ -15,6 +15,13 @@ RCONFLICTS_${PN} = "\ sysvinit-inittab \ " +# most users may want to have getty enabled by default +PACKAGECONFIG ??= "getty" + +PACKAGECONFIG[getty] = "\ + enable_getty \ +" + do_patch[noexec] = "1" do_configure() { @@ -23,11 +30,15 @@ do_configure() { cp ${WORKDIR}/${file/file:\/\//} ${S} done - echo "# generated by bitbake recipe ${PN}" >> ${S}/inittab - for console in "${SERIAL_CONSOLES}"; do - param=$(echo ${console} | sed s/\;/\ /g) - name=$(echo ${param} | cut -d' ' -f2) - echo "$name::respawn:${base_sbindir}/getty ${param}" >> ${S}/inittab + for config in ${PACKAGECONFIG_CONFARGS}; do + if [[ ${config} == "enable_getty" ]]; then + echo "# generated by bitbake recipe ${PN}" >> ${S}/inittab + for console in "${SERIAL_CONSOLES}"; do + param=$(echo ${console} | sed s/\;/\ /g) + name=$(echo ${param} | cut -d' ' -f2) + echo "$name::respawn:${base_sbindir}/getty ${param}" >> ${S}/inittab + done + fi done } |