aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-distro/recipes-devtools/dpkg/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-distro/recipes-devtools/dpkg/files')
-rw-r--r--meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending14
-rw-r--r--meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending.service16
2 files changed, 30 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
diff --git a/meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending.service b/meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending.service
new file mode 100644
index 00000000..57d582f5
--- /dev/null
+++ b/meta-amd-distro/recipes-devtools/dpkg/files/dpkg-configure-pending.service
@@ -0,0 +1,16 @@
+[Unit]
+Description="Configure pkgs with failed postinsts that Sato GUI depends on."
+DefaultDependencies=no
+After=sysinit.target
+Before=multi-user.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/dpkg-configure-pending
+ExecStartPost=/bin/systemctl --no-reload disable dpkg-configure-pending.service
+RemainAfterExit=No
+TimeoutSec=0
+User=root
+
+[Install]
+WantedBy=graphical.target