commit:     a4781f1f7cd1c5cfacfb073628a9d3bc4c0c8e99
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 28 18:36:33 2017 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Aug 28 18:36:33 2017 +0000
URL:        https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=a4781f1f

log in as user when possible

catalyst can create a user, if the cd is built like that it wasn't an
accident, use that user to log in instead of root

 init.d/fixinittab | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init.d/fixinittab b/init.d/fixinittab
index 35513a6..de9ca06 100644
--- a/init.d/fixinittab
+++ b/init.d/fixinittab
@@ -54,12 +54,12 @@ start()
                        then
                            for x in 0 1 2 3 4 5 6
                            do
-                                   echo "c${x}:12345:respawn:/sbin/mingetty 
--noclear --autologin root tty${x}" >> /etc/inittab
+                                   echo "c${x}:12345:respawn:/sbin/mingetty 
--noclear --autologin $(id -nu 1000 2>/dev/null || echo root) tty${x}" >> 
/etc/inittab
                            done
                        else
                            for x in 1 2 3 4 5 6
                            do
-                                   echo "c${x}:12345:respawn:/sbin/mingetty 
--noclear --autologin root tty${x}" >> /etc/inittab
+                                   echo "c${x}:12345:respawn:/sbin/mingetty 
--noclear --autologin $(id -nu 1000 2>/dev/null || echo root) tty${x}" >> 
/etc/inittab
                            done
                        fi
                fi
@@ -78,7 +78,7 @@ start()
                then
                        for x in 1 2 3 4 5 6
                        do
-                               echo "c${x}:12345:respawn:/sbin/mingetty 
--noclear --autologin root tty${x}" >> /etc/inittab
+                               echo "c${x}:12345:respawn:/sbin/mingetty 
--noclear --autologin $(id -nu 1000 2>/dev/null || echo root) tty${x}" >> 
/etc/inittab
                        done
                else
                        eindent

Reply via email to