From dcef944e334663570ce2d13fc22f96d86a2b9a72 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 16 May 2018 11:13:50 +0200 Subject: opkg: avoid running postinst scripts twice when using systemd OpenEmbedded has a built-in mechanism to run postinst scripts offline at build time or, if necessary, on first boot (delayed execution). If the latter is the case and systemd is in use, two services end up doing the same thing: - opkg-configure.service starts "opkg configure" directly. - run-postinsts.service starts "/usr/sbin/run-postinsts" which runs postinst scripts stored in /etc/ipk-postinsts/ or "opkg configure" if package management is installed. Since the run-postinsts.service is also used in cases where no package management is in use, it is the primary means of handling postinsts. Get rid of the opkg-configure.service to avoid duplicate opkg configure execution. (From OE-Core rev: 23dcf7ea3af84721fac126a2b2f0f100f7266368) Signed-off-by: Stefan Agner Signed-off-by: Richard Purdie --- meta/recipes-devtools/opkg/opkg/opkg-configure.service | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 meta/recipes-devtools/opkg/opkg/opkg-configure.service (limited to 'meta/recipes-devtools/opkg/opkg') diff --git a/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/meta/recipes-devtools/opkg/opkg/opkg-configure.service deleted file mode 100644 index 432c3ddc28..0000000000 --- a/meta/recipes-devtools/opkg/opkg/opkg-configure.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 configure > $LOGFILE 2>&1; else @BINDIR@/opkg configure; fi" -ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable opkg-configure.service -StandardOutput=syslog -RemainAfterExit=No - -[Install] -WantedBy=basic.target -WantedBy=sysinit.target -- cgit v1.2.3-54-g00ecf