systemd: fix postinst so u-a can run offline
authorKoen Kooi <koen@dominion.thruhere.net>
Mon, 30 May 2011 18:41:11 +0000 (20:41 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:12:41 +0000 (08:12 -0800)
otherwise we don't get an /sbin/init....

(From meta-openembedded rev: 22c813fa4ba26f39f8814eaf32a030ee59a35f00)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-oe/recipes-core/systemd/systemd_git.bb

index ba57a02..f6c6752 100644 (file)
@@ -15,7 +15,7 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r3"
+PR = "r4"
 
 inherit autotools vala update-alternatives
 
@@ -101,11 +101,12 @@ RRECOMMENDS_${PN} += "kbd kbd-consolefonts \
 # u-a for runlevel and telinit
 
 pkg_postinst_${PN} () {
-# can't do this offline
+# can't do this offline, but we need the u-a bits
 if [ "x$D" != "x" ]; then
-    exit 1
+    echo "can't do addgroup offline"
+else
+       grep "^lock:" /etc/group > /dev/null || addgroup lock
 fi
-grep "^lock:" /etc/group > /dev/null || addgroup lock
 
 update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300
 update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300