user-with-full-skel.bbclass: Fix empty USERNAME case

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2018-11-05 17:20:58 +01:00
parent 3ff8567152
commit 0d99ae45c9

View File

@@ -16,11 +16,13 @@ SKEL_INIT_MARKER = "force-skel-full-init"
# user recipe part
pkg_postinst_${PN}() {
if [ -n "$D" ]; then
if [ -n "$D" -a -n "${USERNAME}" ]; then
touch $D/home/${USERNAME}/${SKEL_INIT_MARKER}
fi
}
do_package[vardeps] += "USERNAME"
# image recipe part
ROOTFS_POSTPROCESS_COMMAND += "postinst_copy_skel; "