From owner-freebsd-current Sat Oct 31 11:17:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA03257 for freebsd-current-outgoing; Sat, 31 Oct 1998 11:17:06 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles325.castles.com [208.214.167.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA03240 for ; Sat, 31 Oct 1998 11:17:02 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id LAA00692; Sat, 31 Oct 1998 11:16:10 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810311916.LAA00692@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Peter Wemm cc: Mike Smith , John Polstra , current@FreeBSD.ORG Subject: Re: New boot loader and alternate kernels In-reply-to: Your message of "Sat, 31 Oct 1998 13:46:50 +0800." <199810310546.NAA18245@spinner.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 31 Oct 1998 11:16:09 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > There's probably a call for a 'bootmodules' variable as well; until we > > get more people using this and asking for features I'm not sure what's > > worth adding and what's just fluff. > > > > How many people would be interested in labels and conditional branches, > > for example? > > What I'd like is something like this: > > timeout 10 "Press enter to boot now, any other key to abort" > load kernel > load foo.ko > boot > > Ie: have an abort-script type capability. It'd save all that loading and > unloading. That's what I meant about the bootmodules comment: set bootfile /kernel set bootmodules foo;bar;nfs;linux autoboot 10 "Press enter to boot, any other key to abort" I probably want to extend 'read' to do something useful with single keystrokes: read -a -t 10 -p "Press enter to boot, other to abort" key if $key == 10 goto boot if $key == 13 goto boot exit :boot load kernel load foo.ko boot This would make single-key point-and-shoot menus pretty easy too; you could even use the response to determine the goto target: :loop set key 1 echo "1 kernel" echo "2 kernel.test" read -t 10 -p "Select >" key -goto label$key goto loop :label1 boot kernel :label2 boot kernel.test By ignoring the error, you get the "if this label doesn't exist" behaviour. I think it's pretty clear that scripts shouldn't be echoed as the default. I hate the DOS "echo on" syntax; any better suggestions? Just another variable? -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message