Patchwork [meta-oe,3/5] systemd: add lock group using useradd.bbclass

login
register
mail settings
Submitter Otavio Salvador
Date Oct. 21, 2011, 1:55 p.m.
Message ID <2388171720d37651846be1edf389c68144fd1898.1319205291.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/13715/
State New, archived
Headers show

Comments

Otavio Salvador - Oct. 21, 2011, 1:55 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/recipes-core/systemd/systemd_git.bb |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

Patch

diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb
index f9e024b..89ded56 100644
--- a/meta-oe/recipes-core/systemd/systemd_git.bb
+++ b/meta-oe/recipes-core/systemd/systemd_git.bb
@@ -14,9 +14,9 @@  inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r1"
+PR = "r2"
 
-inherit pkgconfig autotools vala perlnative
+inherit useradd pkgconfig autotools vala perlnative
 
 SRCREV = "64685e0cea62b4937f0804e47ce2cb7929f58223"
 
@@ -59,6 +59,9 @@  do_install() {
 
 PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs"
 
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r lock"
+
 FILES_${PN}-initramfs = "/init"
 RDEPENDS_${PN}-initramfs = "${PN}"
 
@@ -113,12 +116,4 @@  update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl
 update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
 update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
 update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
-
-# can't do this offline, but we need the u-a bits above
-if [ "x$D" != "x" ]; then
-	echo "can't do addgroup offline" ; exit 1
-else
-	grep "^lock:" /etc/group > /dev/null || addgroup lock
-fi
 }
-