Hello David, [email protected] (David Diggles), 2012.06.25 (Mon) 07:10 (CEST): > Thanks Marcus! I have been sidetracked with a few things, > but will give this technique a try soon.
please do not think I invented that wheel! See misc archives instead... > I take it dostuff.sh is where I could put something like yes. > #!/bin/sh I recommend the use of ``#!/bin/sh -e'', see ksh(1). > while [ ! ]; do I use ``while :; do'' in such cases; BUT: please read init(8), it will respawn your process anyways; read DIAGNOSTICS section carefully, especially the ``getty repeating too quickly'' part. Bye, Marcus > /usr/local/bin/ttyplay kickassci.demo > done > > On Fri, Jun 15, 2012 at 09:36:43AM +0200, MERIGHI Marcus wrote: > > [email protected] (David Diggles), 2012.06.15 (Fri) 00:20 (CEST): > > > I want the default login console to run something like > > > /usr/games/worms -n100 > > > or > > > rsh host /opt/local/bin/xaos -driver aa -autopilot > > > > the way I do it... > > > > $ grep ttyC0 /etc/ttys > > ttyC0 "/usr/local/libexec/getty.sh" vt220 on > > > > $ ls -al /usr/local/libexec/getty.sh > > -rwxr-xr-x 1 root wheel 210 Feb 15 19:01 /usr/local/libexec/getty.sh > > > > $ cat /usr/local/libexec/getty.sh > > #!/bin/ksh -e > > TERM=vt220 /usr/local/sbin/dostuff.sh < /dev/$1 > /dev/$1 > > > > $ ls -la /usr/local/sbin/dostuff.sh > > -rwxr-xr-x 1 root wheel - 2.2K Feb 18 11:28 /usr/local/sbin/dostuff.sh > > > > dostuff.sh has stdin/stdout connected to console, now. > > > > Bye, Marcus > > > > (nice project, btw!) > > !DSPAM:4fe7f2c2455333111015!

