From owner-freebsd-current@FreeBSD.ORG Tue Jul 5 12:45:09 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D459916A41C; Tue, 5 Jul 2005 12:45:09 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F23C43D48; Tue, 5 Jul 2005 12:45:08 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.13.4/8.13.4) with ESMTP id j65Cj6u7054266; Tue, 5 Jul 2005 22:15:06 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-current@freebsd.org Date: Tue, 5 Jul 2005 22:15:00 +0930 User-Agent: KMail/1.8 References: <20050705115234.44adc0ed.lists@yazzy.org> <20050705102010.GA5663@beatrix.daedalusnetworks.priv> <20050705124501.6c9de799.lists@yazzy.org> In-Reply-To: <20050705124501.6c9de799.lists@yazzy.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2818766.Vgb3JaWXl8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200507052215.01611.doconnor@gsoft.com.au> X-Spam-Score: -2.4 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.51 on 203.31.81.10 Cc: Marcin Jessa , Giorgos Keramidas Subject: Re: getty replacement X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 12:45:09 -0000 --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--