[OE-core] [PATCH 1/2] useradd.bbclass: print a warn when useradd not found

Robert Yang liezhi.yang at windriver.com
Mon Oct 23 02:56:35 UTC 2017


Exit quietly makes it very hard for debugging when user is not added as
expected, print a warning helps a lot.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 meta/classes/useradd.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index c9103cb..124becd 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -118,6 +118,7 @@ useradd_sysroot () {
 	# useradd/groupadd tools are unavailable. If there is no dependency, we assume we don't want to
 	# create users in the sysroot
 	if ! command -v useradd; then
+		bbwarn "command useradd not found!"
 		exit 0
 	fi
 
-- 
2.7.4




More information about the Openembedded-core mailing list