aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending')
-rw-r--r--meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending b/meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending
new file mode 100644
index 00000000..ba3bf025
--- /dev/null
+++ b/meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+[ -e /etc/default/postinst ] && . /etc/default/postinst
+if [ "$POSTINST_LOGGING" = "1" ]; then
+ append_log="| tee -a $LOGFILE"
+fi
+
+[ "$POSTINST_LOGGING" = "1" ] && eval echo "Attempting to reconfigure packages on first boot that had failed postinsts..." ${append_log}
+
+dpkg --configure --pending | tee -a $LOGFILE
+
+if [ -n "`which update-rc.d`" ]; then
+ update-rc.d -f dpkg-configure-pending remove | tee -a $LOGFILE
+fi