From: Thomas Horsten Date: Fri, 11 Dec 2009 19:24:06 +0000 (+0000) Subject: Slightly cleaner version of root password change X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a518ce0c7502d9865e5b98db088e6c5d6008a978;p=xenclient%2Fbuild.git Slightly cleaner version of root password change --- diff --git a/target/generic/target_xenclient_skeleton/etc/init.d/S35configuration b/target/generic/target_xenclient_skeleton/etc/init.d/S35configuration index 54403a7..f7f6fb0 100755 --- a/target/generic/target_xenclient_skeleton/etc/init.d/S35configuration +++ b/target/generic/target_xenclient_skeleton/etc/init.d/S35configuration @@ -17,8 +17,7 @@ done if [ -f ${CFGDIR}/password.conf ]; then eval `cat ${CFGDIR}/password.conf` - awk -F: -v OFS=: "/^root:/ {\$2 = \"${PASSWORD}\"; print } ; !/^root:/ {print}" /etc/shadow > /etc/shadow.new - mv -f /etc/shadow.new /etc/shadow + echo "root:${PASSWORD}" | chpasswd --encrypted mv -f ${CFGDIR}/password.conf ${CFGDIR}/password.conf.DONE fi