summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaris Okanovic <haris.okanovic@ni.com>2016-12-05 15:48:18 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-08 10:31:30 +0000
commite3537163a60cf0764185783de20b064990c0940a (patch)
tree2f5558c686ba21fea8436d300642f21259fa88eb
parent595f36bea841321e4e670ed22765aa37e7bf2c66 (diff)
downloadpoky-e3537163a60cf0764185783de20b064990c0940a.tar.gz
run-postinsts: Print message before running deferred postinst scripts
Opkg can defer running postinst scripts to first boot, which can take a while on some systems. The output of `opkg configure` (or whatever pm is used) is redirected to a file when logging is enabled (I.e. $POSTINST_LOGGING == 1), making the machine appear hung during this process. This change simply prints a wait message on the console to inform the user of this potentially long and silent operation so that they do not mistakenly reboot their machine. Why not simply `tee` the output instead? Tee might be provided by BusyBox in some distros, which may need to run update-alternatives in the very postinst scripts being executed by this process. It's therefore not safe to assume Tee (or any other packaged util) is available until the configure process finishes. (From OE-Core rev: 3f8f1d8e4b129e5dfdd63d450887320aa0e33228) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xmeta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 10f2118e96..50c0a1afea 100755
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -48,6 +48,9 @@ if [ -z "$pi_dir" ]; then
48 exit 0 48 exit 0
49fi 49fi
50 50
51echo "Configuring packages on first boot...."
52echo " (This may take several minutes. Please do not power off the machine.)"
53
51[ -e #SYSCONFDIR#/default/postinst ] && . #SYSCONFDIR#/default/postinst 54[ -e #SYSCONFDIR#/default/postinst ] && . #SYSCONFDIR#/default/postinst
52 55
53if [ "$POSTINST_LOGGING" = "1" ]; then 56if [ "$POSTINST_LOGGING" = "1" ]; then