diff options
author | 2017-08-28 14:36:33 -0400 | |
---|---|---|
committer | 2017-08-28 14:36:33 -0400 | |
commit | a4781f1f7cd1c5cfacfb073628a9d3bc4c0c8e99 (patch) | |
tree | ef926f05715215ddde45b846018615fe85a4920a | |
parent | net-setup: Fix zero argument mode (diff) | |
download | livecd-tools-a4781f1f7cd1c5cfacfb073628a9d3bc4c0c8e99.tar.gz livecd-tools-a4781f1f7cd1c5cfacfb073628a9d3bc4c0c8e99.tar.bz2 livecd-tools-a4781f1f7cd1c5cfacfb073628a9d3bc4c0c8e99.zip |
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
-rw-r--r-- | init.d/fixinittab | 6 |
1 files 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 |