]> xenbits.xen.org Git - xenclient/build.git/commitdiff
Slightly cleaner version of root password change
authorThomas Horsten <thomas.horsten@citrix.com>
Fri, 11 Dec 2009 19:24:06 +0000 (19:24 +0000)
committerThomas Horsten <thomas.horsten@citrix.com>
Fri, 11 Dec 2009 19:24:06 +0000 (19:24 +0000)
target/generic/target_xenclient_skeleton/etc/init.d/S35configuration

index 54403a742b4c2b3ed5bb7ce9876e83bcdaed6ed8..f7f6fb030de899398e2a7b8bb4e593d1166adb73 100755 (executable)
@@ -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