|
From: <abe...@us...> - 2014-10-04 21:20:10
|
Revision: 6747
http://sourceforge.net/p/astlinux/code/6747
Author: abelbeck
Date: 2014-10-04 21:20:06 +0000 (Sat, 04 Oct 2014)
Log Message:
-----------
followup to r6746, no need for new update_root_passwd_default() function, use existing update_system_default_users()
Revision Links:
--------------
http://sourceforge.net/p/astlinux/code/6746
Modified Paths:
--------------
branches/1.0/project/astlinux/target_skeleton/etc/init.d/FIRSTRUN
Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/FIRSTRUN
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/etc/init.d/FIRSTRUN 2014-10-03 23:51:54 UTC (rev 6746)
+++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/FIRSTRUN 2014-10-04 21:20:06 UTC (rev 6747)
@@ -25,7 +25,7 @@
local base="$1" user file current IFS
unset IFS
- for user in nobody; do
+ for user in root nobody; do
for file in passwd group; do
current="$(grep "^${user}:" "${base}/etc/${file}")"
if [ -n "$current" -a "$current" != "$(grep "^${user}:" "/etc/${file}")" ]; then
@@ -36,17 +36,6 @@
done
}
-update_root_passwd_default()
-{
- local base="$1" current
-
- current="$(grep "^root:" "${base}/etc/passwd")"
- if [ -n "$current" -a "$current" != "$(grep "^root:" "/etc/passwd")" ]; then
- sed -i -e "s|^root:.*$|${current}|" "/etc/passwd"
- echo "FIRSTRUN: Updated system default 'root' user in '/etc/passwd'"
- fi
-}
-
init () {
local new old=""
@@ -72,11 +61,9 @@
if [ -d /oldroot/mnt/asturo ]; then
add_system_default_users /oldroot/mnt/asturo
update_system_default_users /oldroot/mnt/asturo
- update_root_passwd_default /oldroot/mnt/asturo
elif [ -d /oldroot/image ]; then
add_system_default_users /oldroot/image
update_system_default_users /oldroot/image
- update_root_passwd_default /oldroot/image
fi
case $old in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|