mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH 1/4 branch usrmove] deal common part of etc passwd in 99base
@ 2011-12-23  8:04 Dave Young
  2011-12-25 11:49 ` Cong Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Young @ 2011-12-23  8:04 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA, soltys-R61QfzASbfY

ssh module will need root user in /etc/passwd, so add root and nobody
to /etc/passwd in 99base instead of nfs module
---
 modules.d/95nfs/module-setup.sh  |    2 --
 modules.d/99base/module-setup.sh |    4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index bb3b793..674a438 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -65,8 +65,6 @@ install() {
 
     # Rather than copy the passwd file in, just set a user for rpcbind
     # We'll save the state and restart the daemon from the root anyway
-    egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo  'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd"
-    egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
     egrep '^nfsnobody:' /etc/passwd >> "$initdir/etc/passwd"
     egrep '^rpc:' /etc/passwd >> "$initdir/etc/passwd"
     egrep '^rpcuser:' /etc/passwd >> "$initdir/etc/passwd"
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
index 5297a9d..f6c1209 100755
--- a/modules.d/99base/module-setup.sh
+++ b/modules.d/99base/module-setup.sh
@@ -20,6 +20,10 @@ install() {
         dracut_install bash
         (ln -s bash "${initdir}/bin/sh" || :)
     fi
+
+    #add common users in /etc/passwd, it will be used by nfs/ssh currently
+    egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo  'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd"
+    egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
     # install our scripts and hooks
     inst "$moddir/init" "/init"
     inst "$moddir/initqueue" "/sbin/initqueue"
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-26  5:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-23  8:04 [PATCH 1/4 branch usrmove] deal common part of etc passwd in 99base Dave Young
2011-12-25 11:49 ` Cong Wang
2011-12-26  1:57   ` Dave Young
     [not found]     ` <4EF7D46E.4000109-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-12-26  4:58       ` Cong Wang
     [not found]         ` <CAM_iQpW2FH_ob3u22nii3tAe-yUX-iPctDb2KEPwptrugdQbsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-26  5:42           ` Dave Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox