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:56:49 +0100 |
commit | 524e84028eccf8b2077f356efa96aba897e3e183 (patch) | |
tree | a030cf473d93759569ee79f8f6fc74ad8e969335 /meta/recipes-core/sysvinit | |
parent | a4a556ea679ecc18f089ad8481c8c81025359c7d (diff) | |
download | poky-524e84028eccf8b2077f356efa96aba897e3e183.tar.gz |
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.
(From OE-Core rev: 16df1717c3813ba773e0dfa2d1db471816d8b99b)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/sysvinit')
-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 | |||
53 | } | 53 | } |
54 | 54 | ||
55 | pkg_postinst_${PN} () { | 55 | pkg_postinst_${PN} () { |
56 | # run this on host and on target | ||
57 | if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then | ||
58 | exit 0 | ||
59 | fi | ||
60 | } | ||
61 | |||
62 | pkg_postinst_ontarget_${PN} () { | ||
56 | # run this on the target | 63 | # run this on the target |
57 | if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then | 64 | if [ -e /proc/consoles ]; then |
58 | tmp="${SERIAL_CONSOLES_CHECK}" | 65 | tmp="${SERIAL_CONSOLES_CHECK}" |
59 | for i in $tmp | 66 | for i in $tmp |
60 | do | 67 | do |
@@ -68,11 +75,7 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then | |||
68 | done | 75 | done |
69 | kill -HUP 1 | 76 | kill -HUP 1 |
70 | else | 77 | else |
71 | if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then | 78 | exit 1 |
72 | exit 0 | ||
73 | else | ||
74 | exit 1 | ||
75 | fi | ||
76 | fi | 79 | fi |
77 | } | 80 | } |
78 | 81 | ||