From a45871bfc6a3f800548954dd364b5f53e81804ab Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 28 Dec 2012 14:07:33 +0000 Subject: target: add option to set the root password Add an option in the menuconfig to specify a root password. If set to empty, no root password is created; otherwise, the password is encrypted using MD5 (MD5 is not the default for crypt(3), DES-56 is, but MD5 is widely available, not-so-strong, but not-so-weak either). Add a check for 'mkpasswd' as a new dependency. [Peter: fix typo/capitilization and simplify logic] Signed-off-by: "Yann E. MORIN" Cc: Arnout Vandecappelle Cc: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- support/dependencies/dependencies.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'support') diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh index 7a02512c0..eb5a48184 100755 --- a/support/dependencies/dependencies.sh +++ b/support/dependencies/dependencies.sh @@ -158,6 +158,7 @@ if grep ^BR2_TOOLCHAIN_BUILDROOT=y $CONFIG_FILE > /dev/null && \ exit 1 ; fi fi + if grep -q ^BR2_PACKAGE_CLASSPATH=y $CONFIG_FILE ; then for prog in javac jar; do if ! which $prog > /dev/null ; then @@ -166,3 +167,11 @@ if grep -q ^BR2_PACKAGE_CLASSPATH=y $CONFIG_FILE ; then fi done fi + +if grep -E '^BR2_TARGET_GENERIC_ROOT_PASSWD=".+"$' $CONFIG_FILE > /dev/null 2>&1; then + if ! which mkpasswd > /dev/null 2>&1; then + /bin/echo -e "\nYou need the 'mkpasswd' utility to set the root password\n" + /bin/echo -e "(in Debian/ubuntu, 'mkpasswd' provided by the whois package)\n" + exit 1 + fi +fi -- cgit v1.2.3