aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg
diff options
context:
space:
mode:
authorMuhammad Shakeel <muhammad_shakeel@mentor.com>2013-09-27 18:14:15 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-30 22:02:09 +0100
commitfdcfcea5b8eae1769a217f8efea9c02f037f63fa (patch)
treef3139e36fb3ed7c68b0384e00d767b6d5a566b65 /meta/recipes-devtools/opkg/opkg
parentd856488179d14d05f1121c171abf4eac82e81fb9 (diff)
downloadopenembedded-core-contrib-fdcfcea5b8eae1769a217f8efea9c02f037f63fa.tar.gz
opkg: Use systemd service for first boot configuration
Currently opkg uses a script to configure packages during first time boot. This script is present in rcS.d and when 'sysvinit' is disabled this script doesn't execute. For systemd only distros this newly added service will run the opkg configure during first boot only. Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.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/opkg/opkg')
-rw-r--r--meta/recipes-devtools/opkg/opkg/opkg-configure.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/meta/recipes-devtools/opkg/opkg/opkg-configure.service
new file mode 100644
index 0000000000..a1c3a31796
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/opkg-configure.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Opkg 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@/opkg-cl configure > $LOGFILE 2>&1; else @BINDIR@/opkg-cl configure; fi"
+ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service
+StandardOutput=syslog
+RemainAfterExit=No
+
+[Install]
+WantedBy=basic.target
+WantedBy=sysinit.target