diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-05-01 21:06:46 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-15 10:00:27 +0100 |
commit | 16df1717c3813ba773e0dfa2d1db471816d8b99b (patch) | |
tree | 5bb1767f272e5fed330e273d73bf59a386431c4d | |
parent | c8fa5e7299940792a1c4f5255150a4ce8aac7c54 (diff) | |
download | openembedded-core-16df1717c3813ba773e0dfa2d1db471816d8b99b.tar.gz openembedded-core-16df1717c3813ba773e0dfa2d1db471816d8b99b.tar.bz2 openembedded-core-16df1717c3813ba773e0dfa2d1db471816d8b99b.zip |
sysvinit-inittab: do not use 'exit 1' to postpone to first boot
Instead, first check if we need to do anything at all during first boot,
and if so, either postpone to first boot via pkg_postinst_ontarget()
when running on host, or run the necessary setup code when running on target.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb index 5b9c422caf..8585a418ab 100644 --- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -53,8 +53,15 @@ EOF } pkg_postinst_${PN} () { +# run this on host and on target +if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then + exit 0 +fi +} + +pkg_postinst_ontarget_${PN} () { # run this on the target -if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then +if [ -e /proc/consoles ]; then tmp="${SERIAL_CONSOLES_CHECK}" for i in $tmp do @@ -68,11 +75,7 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then done kill -HUP 1 else - if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then - exit 0 - else - exit 1 - fi + exit 1 fi } |