From 6948502c421e507434d27549985d8a2c422ff0dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 21 Jun 2016 13:14:27 +0200 Subject: [PATCH 1/1] Fix user login generation Fix root.conf export format --- config/user.conf | 4 ++-- lib/export.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/user.conf b/config/user.conf index c35d523..c7df1ef 100644 --- a/config/user.conf +++ b/config/user.conf @@ -1,4 +1,4 @@ -# User login (apg -M L -a 0 -m 8 -x 8 -d -n 1) -USERLOGIN=`apg -M L -a 0 -m 8 -x 8 -d -n 1` +# User login (tr -dc 'a-z' < /dev/urandom | fold -w 8 | head -n 1) +USERLOGIN=`tr -dc 'a-z' < /dev/urandom | fold -w 8 | head -n 1` # User password (apg -m 32 -x 32 -a 0 -d -n 1) USERPASS=`apg -m 32 -x 32 -a 0 -d -n 1` diff --git a/lib/export.sh b/lib/export.sh index 40e3704..c443936 100644 --- a/lib/export.sh +++ b/lib/export.sh @@ -5,5 +5,5 @@ cat /dev/null > root.conf # Append every config parameters for i in `cat config/*.conf | perl -pne 'undef $_ if /^#/; s/=.*$//'`; do - eval echo ${i}=\'\$$i\' | tee -a root.conf + echo "$i='$(eval echo \$$i)'" | tee -a root.conf done -- 2.41.1