summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-01-24 04:47:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-28 00:52:35 +0000
commitb3bb9c770b17be4f7e1e424e0d0ec00ebe5bfb62 (patch)
treef39fa8bcff48a112968daf3d42388bb64337a5ff /meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
parent1ec04bb2154cbaf5ff335c873a666f8bb9c0807e (diff)
downloadast2050-yocto-poky-b3bb9c770b17be4f7e1e424e0d0ec00ebe5bfb62.zip
ast2050-yocto-poky-b3bb9c770b17be4f7e1e424e0d0ec00ebe5bfb62.tar.gz
dpkg: use systemd service for first boot configuration
Use a systemd service file for first boot configuration for dpkg based images which has 'package-management' in its IMAGE_FEATURES. [YOCTO #5719] (From OE-Core rev: 56490921d267b784118df43cbd107925c8b94200) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
new file mode 100644
index 0000000..f0b0789
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=dpkg first boot configure
+DefaultDependencies=no
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
+Before=sysinit.target
+
+[Service]
+Type=oneshot
+EnvironmentFile=-@SYSCONFDIR@/default/postinst
+ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure -a; fi"
+ExecStartPost=@BASE_BINDIR@/systemctl disable dpkg-configure.service
+StandardOutput=syslog
+RemainAfterExit=No
+
+[Install]
+WantedBy=basic.target
+WantedBy=sysinit.target
OpenPOWER on IntegriCloud