From nobody@www.freebsd.org  Wed May 15 09:48:53 2002
Return-Path: <nobody@www.freebsd.org>
Received: from nwww.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by hub.freebsd.org (Postfix) with ESMTP id 5EFD537B40A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 May 2002 09:48:53 -0700 (PDT)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by nwww.freebsd.org (8.12.2/8.12.2) with ESMTP id g4FGmqhG071582
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 May 2002 09:48:52 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.2/8.12.2/Submit) id g4FGmqxC071581;
	Wed, 15 May 2002 09:48:52 -0700 (PDT)
Message-Id: <200205151648.g4FGmqxC071581@www.freebsd.org>
Date: Wed, 15 May 2002 09:48:52 -0700 (PDT)
From: Hiroharu Tamaru <tamaru@myn.rcast.u-tokyo.ac.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: typo in the template for bootfile variable in /boot/defaults/loader.conf
X-Send-Pr-Version: www-1.0

>Number:         38113
>Category:       conf
>Synopsis:       typo in the template for bootfile variable in /boot/defaults/loader.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    matusita
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 15 09:50:01 PDT 2002
>Closed-Date:    Mon Jul 08 07:35:38 PDT 2002
>Last-Modified:  Mon Jul 08 07:35:38 PDT 2002
>Originator:     Hiroharu Tamaru
>Release:        RELENG_4 as of 2002/05/15
>Organization:
The University of Tokyo
>Environment:
Revision 1.25.2.18 of src/sys/boot/forth/loader.conf

>Description:
The comma on the following line in src/sys/boot/forth/loader.conf
should be a semicolon.

#bootfile="kernel,kernel.old"   # Set the default boot file set




>How-To-Repeat:
put 

kernel="/nonexistent"
bootfile="kernel,kernel.old"

in /boot/loader.conf and reboot.
The loader complains it cannot load file "kernel,kernel.old"
even if kernel or kernel.old exists.

>Fix:
use semicolon instead.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->matusita 
Responsible-Changed-By: matusita 
Responsible-Changed-When: Wed May 15 18:25:22 PDT 2002 
Responsible-Changed-Why:  
I would like to handle this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38113 
State-Changed-From-To: open->analyzed 
State-Changed-By: matusita 
State-Changed-When: Wed May 15 18:31:28 PDT 2002 
State-Changed-Why:  
Seems reasonable.  This fix can be applied to 4-stable only, since 
5-current's loader.conf doesn't have this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38113 

From: Makoto Matsushita <matusita@jp.FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: dcs@FreeBSD.org
Subject: Re: conf/38113: typo in the template for bootfile variable in
 /boot/defaults/loader.conf
Date: Thu, 16 May 2002 10:31:04 +0900

 tamaru> The comma on the following line in src/sys/boot/forth/loader.conf
 tamaru> should be a semicolon.
 tamaru> #bootfile="kernel,kernel.old"   # Set the default boot file set
 
 How about this patch, dcs.  Would you please review it?
 
 It seems that it only for 4-stable, since 5-current's loader.conf is
 statically sets bootfile to 'kernel' now.  If it is OK for you I'll
 contact re@, to put this change into 4.6-RELEASE.
 
 Index: loader.conf
 ===================================================================
 RCS file: /home/ncvs/src/sys/boot/forth/loader.conf,v
 retrieving revision 1.25.2.18
 diff -u -r1.25.2.18 loader.conf
 --- loader.conf	28 Apr 2002 22:49:54 -0000	1.25.2.18
 +++ loader.conf	16 May 2002 01:26:24 -0000
 @@ -43,7 +43,7 @@
  ##############################################################
  
  #autoboot_delay="10"		# Delay in seconds before autobooting
 -#bootfile="kernel,kernel.old"	# Set the default boot file set
 +#bootfile="kernel;kernel.old"	# Set the default boot file set
  #console="vidconsole"		# Set the current console
  #currdev="disk1s1a"		# Set the current device
  #module_path="/;/boot;/modules"	# Set the module search path
 
 -- -
 Makoto `MAR' Matsushita

From: "Daniel C. Sobral" <daniel.sobral@tcoip.com.br>
To: Makoto Matsushita <matusita@jp.FreeBSD.org>
Cc: bug-followup@FreeBSD.org, dcs@FreeBSD.org
Subject: Re: conf/38113: typo in the template for bootfile variable in /boot/defaults/loader.conf
Date: Fri, 17 May 2002 09:34:43 -0300

 Fix common/help.common too, please. Aside from that, I agree with the patch.
 
 Makoto Matsushita wrote:
 > tamaru> The comma on the following line in src/sys/boot/forth/loader.conf
 > tamaru> should be a semicolon.
 > tamaru> #bootfile="kernel,kernel.old"   # Set the default boot file set
 > 
 > How about this patch, dcs.  Would you please review it?
 > 
 > It seems that it only for 4-stable, since 5-current's loader.conf is
 > statically sets bootfile to 'kernel' now.  If it is OK for you I'll
 > contact re@, to put this change into 4.6-RELEASE.
 > 
 > Index: loader.conf
 > ===================================================================
 > RCS file: /home/ncvs/src/sys/boot/forth/loader.conf,v
 > retrieving revision 1.25.2.18
 > diff -u -r1.25.2.18 loader.conf
 > --- loader.conf	28 Apr 2002 22:49:54 -0000	1.25.2.18
 > +++ loader.conf	16 May 2002 01:26:24 -0000
 > @@ -43,7 +43,7 @@
 >  ##############################################################
 >  
 >  #autoboot_delay="10"		# Delay in seconds before autobooting
 > -#bootfile="kernel,kernel.old"	# Set the default boot file set
 > +#bootfile="kernel;kernel.old"	# Set the default boot file set
 >  #console="vidconsole"		# Set the current console
 >  #currdev="disk1s1a"		# Set the current device
 >  #module_path="/;/boot;/modules"	# Set the module search path
 > 
 > -- -
 > Makoto `MAR' Matsushita
 
 
 -- 
 Daniel C. Sobral                   (8-DCS)
 Daniel.Sobral@tcoip.com.br
 dcs@newsguy.com
 dcs@freebsd.org
 capo@notorious.bsdconspiracy.net
 
 Real programmers don't comment their code. if it is hard
 to write, it should be hard to understand.
 

From: Makoto Matsushita <matusita@jp.FreeBSD.org>
To: daniel.sobral@tcoip.com.br, dcs@FreeBSD.org
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/38113: typo in the template for bootfile variable in
 /boot/defaults/loader.conf
Date: Fri, 17 May 2002 21:54:48 +0900

 daniel.sobral> Fix common/help.common too, please. Aside from that, I
 daniel.sobral> agree with the patch.
 
 Can I patch to 5-current's common/help.common, just like this:
 
 Index: src/sys/boot/common/help.common
 ===================================================================
 RCS file: /home/ncvs/src/sys/boot/common/help.common,v
 retrieving revision 1.16
 diff -u -r1.16 help.common
 --- src/sys/boot/common/help.common	4 Dec 2001 12:01:00 -0000	1.16
 +++ src/sys/boot/common/help.common	17 May 2002 12:52:52 -0000
 @@ -123,9 +123,9 @@
  ################################################################################
  # Tset Sbootfile DSet the default boot file set
  
 -	set bootfile=<filename>[,<filename>...]
 +	set bootfile=<filename>[;<filename>...]
  
 -	The default search path for bootable kernels is /kernel,/kernel.old.
 +	The default search path for bootable kernels is /boot/kernel/kernel.
  	It may be overridden by setting the bootfile variable to a 
  	semicolon-separated list of paths, which will be searched for in turn.
 
 And, of course, patch to 4-stable also:
 
 Index: src/sys/boot/common/help.common
 ===================================================================
 RCS file: /home/ncvs/src/sys/boot/common/help.common,v
 retrieving revision 1.14.2.2
 diff -u -r1.14.2.2 help.common
 --- src/sys/boot/common/help.common	7 Dec 2001 11:55:22 -0000	1.14.2.2
 +++ src/sys/boot/common/help.common	17 May 2002 12:53:54 -0000
 @@ -123,9 +123,9 @@
  ################################################################################
  # Tset Sbootfile DSet the default boot file set
  
 -	set bootfile=<filename>[,<filename>...]
 +	set bootfile=<filename>[;<filename>...]
  
 -	The default search path for bootable kernels is /kernel,/kernel.old.
 +	The default search path for bootable kernels is /kernel;/kernel.old.
  	It may be overridden by setting the bootfile variable to a 
  	semicolon-separated list of paths, which will be searched for in turn.
  
 -- -
 Makoto `MAR' Matsushita

From: "Daniel C. Sobral" <daniel.sobral@tcoip.com.br>
To: Makoto Matsushita <matusita@jp.FreeBSD.org>
Cc: dcs@FreeBSD.org, bug-followup@FreeBSD.org
Subject: Re: conf/38113: typo in the template for bootfile variable in /boot/defaults/loader.conf
Date: Fri, 17 May 2002 10:15:24 -0300

 Default search path on current is WAY more complicated than that. Search 
 the commit logs of loader.4th. I think it's there.
 
 Makoto Matsushita wrote:
 > daniel.sobral> Fix common/help.common too, please. Aside from that, I
 > daniel.sobral> agree with the patch.
 > 
 > Can I patch to 5-current's common/help.common, just like this:
 > 
 > Index: src/sys/boot/common/help.common
 > ===================================================================
 > RCS file: /home/ncvs/src/sys/boot/common/help.common,v
 > retrieving revision 1.16
 > diff -u -r1.16 help.common
 > --- src/sys/boot/common/help.common	4 Dec 2001 12:01:00 -0000	1.16
 > +++ src/sys/boot/common/help.common	17 May 2002 12:52:52 -0000
 > @@ -123,9 +123,9 @@
 >  ################################################################################
 >  # Tset Sbootfile DSet the default boot file set
 >  
 > -	set bootfile=<filename>[,<filename>...]
 > +	set bootfile=<filename>[;<filename>...]
 >  
 > -	The default search path for bootable kernels is /kernel,/kernel.old.
 > +	The default search path for bootable kernels is /boot/kernel/kernel.
 >  	It may be overridden by setting the bootfile variable to a 
 >  	semicolon-separated list of paths, which will be searched for in turn.
 > 
 > And, of course, patch to 4-stable also:
 > 
 > Index: src/sys/boot/common/help.common
 > ===================================================================
 > RCS file: /home/ncvs/src/sys/boot/common/help.common,v
 > retrieving revision 1.14.2.2
 > diff -u -r1.14.2.2 help.common
 > --- src/sys/boot/common/help.common	7 Dec 2001 11:55:22 -0000	1.14.2.2
 > +++ src/sys/boot/common/help.common	17 May 2002 12:53:54 -0000
 > @@ -123,9 +123,9 @@
 >  ################################################################################
 >  # Tset Sbootfile DSet the default boot file set
 >  
 > -	set bootfile=<filename>[,<filename>...]
 > +	set bootfile=<filename>[;<filename>...]
 >  
 > -	The default search path for bootable kernels is /kernel,/kernel.old.
 > +	The default search path for bootable kernels is /kernel;/kernel.old.
 >  	It may be overridden by setting the bootfile variable to a 
 >  	semicolon-separated list of paths, which will be searched for in turn.
 >  
 > -- -
 > Makoto `MAR' Matsushita
 
 
 -- 
 Daniel C. Sobral                   (8-DCS)
 Daniel.Sobral@tcoip.com.br
 dcs@newsguy.com
 dcs@freebsd.org
 capo@notorious.bsdconspiracy.net
 
 "But Huey, you PROMISED!"
 "Tell 'em I lied."
 

From: Makoto Matsushita <matusita@jp.FreeBSD.org>
To: daniel.sobral@tcoip.com.br
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/38113: typo in the template for bootfile variable in
 /boot/defaults/loader.conf
Date: Fri, 17 May 2002 22:33:57 +0900

 daniel.sobral> Default search path on current is WAY more complicated
 daniel.sobral> than that. Search the commit logs of loader.4th. I
 daniel.sobral> think it's there.
 
 Ah, that's right, I've just forgotten about that:
 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/boot/forth/loader.4th#rev1.12
 
 But are following sentences still valid for 5-current that
 
 > It may be overridden by setting the bootfile variable to a
 > semicolon-separated list of paths, which will be searched for
 > in turn.
 
 i.e., if 'path1;path2' was set, does loader try as follows?
 
 ${kernel} (if an absolute path)
 /boot/${kernel}/${kernel}
 /boot/${kernel}/path1
 /boot/${kernel}/path2
 ...
 
 Hmm, it seems that we also have to fix loader(8) manpage.
 
 -- -
 Makoto `MAR' Matsushita

From: "Daniel C. Sobral" <daniel.sobral@tcoip.com.br>
To: Makoto Matsushita <matusita@jp.FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/38113: typo in the template for bootfile variable in /boot/defaults/loader.conf
Date: Fri, 17 May 2002 13:32:55 -0300

 Makoto Matsushita wrote:
 > daniel.sobral> Default search path on current is WAY more complicated
 > daniel.sobral> than that. Search the commit logs of loader.4th. I
 > daniel.sobral> think it's there.
 > 
 > Ah, that's right, I've just forgotten about that:
 > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/boot/forth/loader.4th#rev1.12
 > 
 > But are following sentences still valid for 5-current that
 > 
 > 
 >>It may be overridden by setting the bootfile variable to a
 >>semicolon-separated list of paths, which will be searched for
 >>in turn.
 > 
 > 
 > i.e., if 'path1;path2' was set, does loader try as follows?
 > 
 > ${kernel} (if an absolute path)
 > /boot/${kernel}/${kernel}
 > /boot/${kernel}/path1
 > /boot/${kernel}/path2
 > ...
 > 
 > Hmm, it seems that we also have to fix loader(8) manpage.
 
 See the following comment in the link above:
 
 > The last instance of ${kernel} and ${bootfile} will be treated as a
 > list of semicolon separated file names, and each will be tried in turn,
 > from left to right.
 
 Ie, in that case it will try:
 
 ${kernel} if ${kernel} is an absolute path
 /boot/${kernel}/${kernel}
 /boot/${kernel}/${bootfile}
 ${kernel}/${kernel}
 ${kernel}/${bootfile}
 ${kernel}
 ${bootfile}
 
 Ie, it only considers the possibility of multiple paths in the last two 
 cases. I think. :-)
 
 Here the usefulness of multiple paths is balanced against the usefulness 
 of the kernel directory/name combination used in 5.0, the complexity of 
 accomodating both strategies, and how intuitive is the list of search path.
 
 Right now, if you set kernel and/or bootfile, it will usually do what 
 you expect it to, whatever that is. :-)
 
 -- 
 Daniel C. Sobral                   (8-DCS)
 Daniel.Sobral@tcoip.com.br
 dcs@newsguy.com
 dcs@freebsd.org
 capo@notorious.bsdconspiracy.net
 
 Experience, n:
 	Something you don't get until just after you need it.
 		-- Olivier
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: mp 
State-Changed-When: Mon Jul 8 07:34:43 PDT 2002 
State-Changed-Why:  
This is a duplicate of 39679 which is now in -current and will be MFC'd soon. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38113 
>Unformatted:
