From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 11 14:10:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DF751065677 for ; Tue, 11 Aug 2009 14:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4A31B8FC53 for ; Tue, 11 Aug 2009 14:10:03 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7BEA2b9030477 for ; Tue, 11 Aug 2009 14:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7BEA2H2030476; Tue, 11 Aug 2009 14:10:02 GMT (envelope-from gnats) Resent-Date: Tue, 11 Aug 2009 14:10:02 GMT Resent-Message-Id: <200908111410.n7BEA2H2030476@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Leun Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2B2D1065672 for ; Tue, 11 Aug 2009 14:08:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C6AC58FC1F for ; Tue, 11 Aug 2009 14:08:44 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n7BE8iRm045871 for ; Tue, 11 Aug 2009 14:08:44 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n7BE8hVn045864; Tue, 11 Aug 2009 14:08:43 GMT (envelope-from nobody) Message-Id: <200908111408.n7BE8hVn045864@www.freebsd.org> Date: Tue, 11 Aug 2009 14:08:43 GMT From: Michael Leun To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/137671: [patch][request] enhance beastie.4th: possibility to display message, possibility to coose serial console X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2009 14:10:03 -0000 >Number: 137671 >Category: conf >Synopsis: [patch][request] enhance beastie.4th: possibility to display message, possibility to coose serial console >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 11 14:10:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Michael Leun >Release: 7.2 >Organization: Vodafone AG & Co. KG >Environment: FreeBSD build72-64.tnd.arcor.net 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 07:18:07 UTC 2009 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I created an custom install disk which installs without any interaction. You do NOT want to boot this by error on a wrong machine. So I wanted to - turn off the 10 secs countdown to autoboot (easily done with autoboot_delay=NO) - display a big fat warning message stating that this disk may shoot into your foot Additionaly I wanted a simple possibility to boot with console=comconsole. So I added: - you may specify beastie_message="something" e.g. in loader.conf If this environment variable is defined, the text "Welcome to FreeBSD!" is displayed 2 lines up then the usual place leading to 2 lines room for an message. The text in the environment variable is displayed between the greeting and the menue. e.g. beastie_message="ESC[1;7mATTENTION! This CD will format disks andESC[7;4Hinstall without further interaction!ESC[1;0m" - you may specify beastie_offerserial=YES If you do so, you get an additional menue entry which sets console=comconsole and boots. >How-To-Repeat: not applicable >Fix: patch attached Patch attached with submission follows: --- sys/boot/forth/beastie.4th.orig 2009-08-11 15:49:15.000000000 +0200 +++ sys/boot/forth/beastie.4th 2009-08-11 15:49:18.000000000 +0200 @@ -45,6 +45,7 @@ variable bootsinglekey variable escapekey variable rebootkey +variable bootserialkey 46 constant dot @@ -178,7 +179,16 @@ clear 46 4 print-logo 42 20 2 2 box - 13 6 at-xy ." Welcome to FreeBSD!" + s" beastie_message" getenv + dup -1 = if + drop + 13 6 at-xy ." Welcome to FreeBSD!" + else + 13 4 at-xy ." Welcome to FreeBSD!" + 4 6 at-xy ." " + s" beastie_message" getenv + type + then printmenuitem ." Boot FreeBSD [default]" bootkey ! s" arch-i386" environment? if drop @@ -194,6 +204,14 @@ printmenuitem ." Boot FreeBSD in Safe Mode" bootsafekey ! printmenuitem ." Boot FreeBSD in single user mode" bootsinglekey ! printmenuitem ." Boot FreeBSD with verbose logging" bootverbosekey ! + s" beastie_offerserial" getenv + dup -1 <> if + s" YES" compare-insensitive 0= if + printmenuitem ." Boot FreeBSD with serial console" bootserialkey ! + then + else + drop + then printmenuitem ." Escape to loader prompt" escapekey ! printmenuitem ." Reboot" rebootkey ! menuX @ 20 at-xy @@ -288,7 +306,13 @@ s" NO" s" autoboot_delay" setenv exit then - rebootkey @ = if 0 reboot then + dup rebootkey @ = if + 0 reboot + then + bootserialkey @ = if + s" comconsole" s" console" setenv + 0 boot + then again ; >Release-Note: >Audit-Trail: >Unformatted: