From owner-freebsd-current@FreeBSD.ORG Fri Jul 8 09:34:26 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 CDEFD16A41C for ; Fri, 8 Jul 2005 09:34:26 +0000 (GMT) (envelope-from andy@siliconlandmark.com) Received: from lexi.siliconlandmark.com (lexi.siliconlandmark.com [209.69.98.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 698FD43D49 for ; Fri, 8 Jul 2005 09:34:26 +0000 (GMT) (envelope-from andy@siliconlandmark.com) Received: from lexi.siliconlandmark.com (localhost [127.0.0.1]) by lexi.siliconlandmark.com (8.13.3/8.13.3) with ESMTP id j689YJMq028732; Fri, 8 Jul 2005 05:34:19 -0400 (EDT) (envelope-from andy@siliconlandmark.com) Received: from localhost (andy@localhost) by lexi.siliconlandmark.com (8.13.3/8.13.3/Submit) with ESMTP id j689YJMr028729; Fri, 8 Jul 2005 05:34:19 -0400 (EDT) (envelope-from andy@siliconlandmark.com) X-Authentication-Warning: lexi.siliconlandmark.com: andy owned process doing -bs Date: Fri, 8 Jul 2005 05:34:19 -0400 (EDT) From: Andre Guibert de Bruet To: Marcin Jessa In-Reply-To: <20050705120926.57cc6481.lists@yazzy.org> Message-ID: <20050708053157.J80892@lexi.siliconlandmark.com> References: <20050705115234.44adc0ed.lists@yazzy.org> <20050705100346.GM56644@camelot.theinternet.com.au> <20050705120926.57cc6481.lists@yazzy.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Information: Please contact the ISP for more information X-SL-MailScanner: Found to be clean X-SL-SpamCheck: not spam, SpamAssassin (score=-2.54, required 6, autolearn=not spam, AWL 0.06, BAYES_00 -2.60) X-MailScanner-From: andy@siliconlandmark.com 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: Fri, 08 Jul 2005 09:34:26 -0000 On Tue, 5 Jul 2005, Marcin Jessa wrote: > On Tue, 5 Jul 2005 20:03:46 +1000 > Andrew Milton wrote: >> +-------[ Marcin Jessa ]---------------------- >> | 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 ? Your application should not return control to init many times within a few seconds, lest you see the dreaded "repeating too quickly" message. Andy /* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */ /* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */ /* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */ /* WWW: siliconlandmark.com * Tormenting bytes since 1980. */