On Lu, 20 ian 14, 18:09:59, Todd Maurice wrote: > > I have been using Hello World script to reduce problems that might > arise from using a complex script but later I would like to use this > setup for autologin. Uhh, another case of XY problem http://meta.stackoverflow.com/questions/66377/what-is-the-xy-problem
> #!/bin/bash
> sed -i '54d' /etc/inittab
> echo "1:2345:respawn:/bin/login -f user tty1 </dev/tty1 >/dev/tty1 2>&1" >>
> /etc/inittab
To accomplish what you want I would change /etc/inittab with a
late_command, *but* the commands above are not really safe:
1. you rely on the specific format of /etc/inittab
2. your script is not indempotent, just think what happens if you run it
several times
3. sed can do the change in one go ;)
This should work (all in one line):
sed -i -e 's,1:2345:respawn:\/sbin\/getty 38400 tty1,1:2345:respawn:\/bin/login
-f user tty1 <\/dev\/tty1 >\/dev\/tty1 2>&>1,' /etc/inittab
Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt
signature.asc
Description: Digital signature

