From owner-freebsd-hackers Thu May 9 12:13:31 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.dis.org (dhcp45-25.dis.org [216.240.45.25]) by hub.freebsd.org (Postfix) with ESMTP id 1466837B409 for ; Thu, 9 May 2002 12:13:25 -0700 (PDT) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.12.3/8.12.3) with ESMTP id g49JBaI3002178; Thu, 9 May 2002 12:11:36 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200205091911.g49JBaI3002178@mass.dis.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Gordon Tetlow Cc: hackers@freebsd.org Subject: Re: nextboot loader diff In-reply-to: Your message of "Thu, 09 May 2002 12:03:23 PDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 09 May 2002 12:11:36 -0700 From: Michael Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > > I've finally learned enough forth to put together a diff to implement som > e > > > nextboot functionality in the loader. > > > > > > Basically, the loader peeks into the first line of /boot/nextboot.conf to > > > > see if nextboot_enable="YES" is there. If it is, it reads the entire > > > config, then rewrites the first line to nextboot_enable="NO" > > > > Don't do this. Put the variables directly into loader.conf. There's no > > need for another file. > > I think it's a bad idea to try to rewrite /boot/loader.conf. I purposely > went for /boot/nextboot.conf so that if something went wrong with the > rewrite, it (hopefully) wouldn't hose the user's settings. You're fooling yourself if you think that just because you're rewriting a different file, "something going wrong" isn't going to hose the user anyway. You probably want to overwrite with "TRY" rather than "NO", too, since userland needs something to key off to know that this is a 'next' boot. Obviously, "TRY" then gets overwritten with "NO" on the next boot, but the new kernel is not booted (this is the 'recovery') boot. I still think you're not thinking the processes associated with this feature through carefully enough. = Mike -- To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public. - Theodore Roosevelt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message