Date: Sat, 31 Oct 1998 11:16:09 -0800 From: Mike Smith <mike@smith.net.au> To: Peter Wemm <peter@netplex.com.au> Cc: Mike Smith <mike@smith.net.au>, John Polstra <jdp@polstra.com>, current@FreeBSD.ORG Subject: Re: New boot loader and alternate kernels Message-ID: <199810311916.LAA00692@dingo.cdrom.com> In-Reply-To: Your message of "Sat, 31 Oct 1998 13:46:50 %2B0800." <199810310546.NAA18245@spinner.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810311916.LAA00692>