From e52d8281eb98dbade2d82451fa9788285121437e Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Mon, 2 Feb 2015 14:07:47 -0800 Subject: core-image: split debug-tweaks into individual features Split the debug-tweaks into a more fine tunable set of IMAGE_FEATURES which activate the component functions. Clean-up image-core and image bbclass by having the ROOTFS_POSTPROCESS_COMMANDs in in one place for the debug-tweaks related functions [YOCTO #5344] Signed-off-by: Saul Wold --- meta/classes/image.bbclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'meta/classes/image.bbclass') diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index b2a3e97820..152164851e 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -162,10 +162,16 @@ IMAGE_CLASSES += "image_types" inherit ${IMAGE_CLASSES} IMAGE_POSTPROCESS_COMMAND ?= "" + +# Zap the root password if debug-tweaks feature is not enabled +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}' + # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "ssh_allow_empty_password; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}' + # Enable postinst logging if debug-tweaks is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "postinst_enable_logging; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}' + # Write manifest IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest" ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " -- cgit 1.2.3-korg