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>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2818766.Vgb3JaWXl8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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= =20 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=3D$1 else args=3D"$args $1" fi shift done tty=3D$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. =2D-=20 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 --nextPart2818766.Vgb3JaWXl8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBCyoDN5ZPcIHs/zowRAsoiAJ96RunjhY9hLmH2t2uk41tNBvm2JwCeLt4E J03NLOZD2gzb4kDzh/iRIUI= =Os5s -----END PGP SIGNATURE----- --nextPart2818766.Vgb3JaWXl8--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507052215.01611.doconnor>