Date: Tue, 11 Aug 2009 14:08:43 GMT From: Michael Leun <michael.leun@arcor.net> To: freebsd-gnats-submit@FreeBSD.org Subject: conf/137671: [patch][request] enhance beastie.4th: possibility to display message, possibility to coose serial console Message-ID: <200908111408.n7BE8hVn045864@www.freebsd.org> Resent-Message-ID: <200908111410.n7BEA2H2030476@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908111408.n7BE8hVn045864>