summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2017-08-28 14:36:33 -0400
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2017-08-28 14:36:33 -0400
commita4781f1f7cd1c5cfacfb073628a9d3bc4c0c8e99 (patch)
treeef926f05715215ddde45b846018615fe85a4920a
parentnet-setup: Fix zero argument mode (diff)
downloadlivecd-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/fixinittab6
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