Date: Tue, 5 Jul 2005 22:15:00 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-current@freebsd.org Cc: Marcin Jessa <lists@yazzy.org>, Giorgos Keramidas <keramida@freebsd.org> Subject: Re: getty replacement Message-ID: <200507052215.01611.doconnor@gsoft.com.au> In-Reply-To: <20050705124501.6c9de799.lists@yazzy.org> References: <20050705115234.44adc0ed.lists@yazzy.org> <20050705102010.GA5663@beatrix.daedalusnetworks.priv> <20050705124501.6c9de799.lists@yazzy.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Tue, 5 Jul 2005 20:15, Marcin Jessa wrote:
> That unfortunatelly does not seem to work.
> I tried a shell script with a read -p "Blah blah" my_choice
> which should wait for an execution but this did not work either giving me
> exactly the same message... _______________________________________________
I believe your getty program has to open the tty that init passed it.
I suspect stdin is redirected to /dev/null by init for your program so the
read exits.
I just tried this and it works fine..
#!/bin/sh
logger "Got these args $*"
while [ $# -gt 1 ]; do
if [ -z "$args" ]; then
args=$1
else
args="$args $1"
fi
shift
done
tty=$1
logger "tty is $tty"
logger "other args are $args"
echo "Hello there" >/dev/$tty
sleep 600
Note that the TTY name is last in the argument list.
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)
iD8DBQBCyoDN5ZPcIHs/zowRAsoiAJ96RunjhY9hLmH2t2uk41tNBvm2JwCeLt4E
J03NLOZD2gzb4kDzh/iRIUI=
=Os5s
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507052215.01611.doconnor>
