]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
deal common part of etc passwd in 99base
authorDave Young <dyoung@redhat.com>
Mon, 26 Dec 2011 06:29:11 +0000 (14:29 +0800)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Jan 2012 08:48:35 +0000 (09:48 +0100)
ssh module will need root user in /etc/passwd, so add root and nobody
to /etc/passwd in 99base instead of nfs module

Signed-off-by: Dave Young <dyoung@redhat.com>
modules.d/95nfs/module-setup.sh
modules.d/99base/module-setup.sh

index 6778f286e1647703b0c0ab9afc74c3662e31d784..3ccdafc8289e7e7d284e0efad699459f3691196c 100755 (executable)
@@ -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"
index 5297a9d354218ad81cdd304b98bf82b79fd7978b..f6c1209c7ef27319db71f0b903946fca7e42ea29 100755 (executable)
@@ -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"