[OE-core] [PATCH] util-linux: add user uuidd and group uuidd
Li xin
lixin.fnst at cn.fujitsu.com
Thu Jun 25 08:55:53 UTC 2015
it is need to start uuidd.service.
Signed-off-by: Li Xin <lixin.fnst at cn.fujitsu.com>
---
meta/recipes-core/util-linux/util-linux.inc | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 60309a5..0d3c742 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
-inherit autotools gettext pkgconfig systemd update-alternatives python-dir
+inherit autotools gettext pkgconfig systemd update-alternatives python-dir useradd
DEPENDS = "zlib ncurses"
DEPENDS_append_class-native = " lzo-native"
DEPENDS_append_class-nativesdk = " lzo-native"
@@ -171,6 +171,13 @@ do_install_append_class-native () {
rm -f ${D}${base_sbindir}/nologin
}
+USERADD_PACKAGES = "${PN}-uuidd"
+FILES_util-linux-uuidd += "/var/lib/libuuid /var/uuidd"
+
+USERADD_PARAM_${PN}-uuidd = "-r -d /var/lib/libuuid -M \
+ -s /sbin/nologin -g uuidd uuidd"
+GROUPADD_PARAM_${PN}-uuidd = "-f -r uuidd"
+
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
@@ -260,3 +267,17 @@ python populate_packages_prepend() {
description='util-linux lib%s',
extra_depends='', prepend=True, allow_links=True)
}
+
+pkg_postinst_${PN}-uuidd () {
+ if [ "x$D" != "x" ]; then
+ OPTS="--root=$D"
+ if type systemctl >/dev/null 2>/dev/null; then
+ systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
+ fi
+ exit 1
+ fi
+
+ chown uuidd.uuidd ${sbindir}/uuidd
+ chmod g+s ${libdir}/libuuid
+}
+
--
1.8.4.2
More information about the Openembedded-core
mailing list