From owner-freebsd-current@FreeBSD.ORG Tue Jul 5 10:09:18 2005 Return-Path: X-Original-To: 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 71C2C16A41C for ; Tue, 5 Jul 2005 10:09:18 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from mail.yazzy.org (mail.yazzy.org [217.8.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DC4843D55 for ; Tue, 5 Jul 2005 10:09:18 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from 217-13-2-82.dd.nextgentel.com ([217.13.2.82] helo=h311r4z3r) by mail.yazzy.org with esmtps (TLSv1:AES256-SHA:256) (YazzY.org) id 1DpkMf-0005e6-UX; Tue, 05 Jul 2005 12:09:18 +0200 Date: Tue, 5 Jul 2005 12:09:26 +0200 From: Marcin Jessa To: Andrew Milton Message-Id: <20050705120926.57cc6481.lists@yazzy.org> In-Reply-To: <20050705100346.GM56644@camelot.theinternet.com.au> References: <20050705115234.44adc0ed.lists@yazzy.org> <20050705100346.GM56644@camelot.theinternet.com.au> Organization: YazzY.org X-Mailer: Sylpheed version 1.9.12 (GTK+ 2.6.8; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) Cc: current@freebsd.org 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 10:09:18 -0000 On Tue, 5 Jul 2005 20:03:46 +1000 Andrew Milton wrote: > +-------[ Marcin Jessa ]---------------------- > | Hi guys. > | > | Is there any way to replace "/usr/libexec/getty Pc" with a custom application and what would be requirements for such an app? > > It's definitely do-able with compiled code. > > | Running > | ttyv0 "/some/app/shell_code.sh Pc" cons23 on secure > | gives me: > | init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs > | and my code is not executed. > > This won't work, because shell scripts aren't directly executable. The shell > handles parsing the #!/bin/sh header and executing them for you. Putting /bin/sh to parse #!/bin/sh header infront of it does not change that behaviour, which should work according to what you said. Are there any other requirements besides having compiled code ?