From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 7 18:00:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB5C216A4CE for ; Thu, 7 Oct 2004 18:00:10 +0000 (GMT) Received: from mail01.stbernard.com (mail01.stbernard.com [199.245.188.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BED243D4C for ; Thu, 7 Oct 2004 18:00:10 +0000 (GMT) (envelope-from khall@stbernard.com) X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 7 Oct 2004 11:00:06 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: BTX scripting help Thread-Index: AcSsl3pQifvrjz8IRAu2D8e4JDiE+g== From: "Kelly Hall" To: Subject: BTX scripting help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 18:00:10 -0000 Hi Folks, =20 I'm trying to automate a sequence of BTX commands and I'm hitting some snags. I've got some minor forth experience, but it isn't enough. =20 My machine uses the standard bootloader and doesn't present a menu for the user. By default, the machine boots a standard kernel and fs-image file and everything is happy. Sometimes, though, I want my users to be able to boot an alternate kernel and fs-image. To do this, what they do now is: - wait for the default kernel to start loading - hit the space bar - BTX breaks out and gives them a prompt - they type four commands: - unload - load /kernel - load -t md_image /altfs-image - boot I'd like to replace those four commands with one command to make things nicer for them. =20 So I tried to define the obvious forth word: : altboot unload load /kernel load -t md_image /altfs-image boot ; which fails to compile because /kernel isn't a word. These all compile, but reboot when invoked : altboot unload s" /kernel" load ; \ reboots the box : altboot unload load s" /kernel" ; \ reboots the box : altboot unload ." /kernel" load ; \ reboots the box : altboot unload load ." /kernel" ; \ reboots the box =20 I'm stumped. Any suggestions? =20 Kelly