From nobody@FreeBSD.org  Wed Jun 30 18:16:26 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0E2BC16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 Jun 2004 18:16:26 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0808C43D3F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 Jun 2004 18:16:26 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i5UIFkTg065816
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 Jun 2004 18:15:46 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i5UIFkdE065815;
	Wed, 30 Jun 2004 18:15:46 GMT
	(envelope-from nobody)
Message-Id: <200406301815.i5UIFkdE065815@www.freebsd.org>
Date: Wed, 30 Jun 2004 18:15:46 GMT
From: Craig Carey <research@ijs.co.nz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Loader's verbose boot mode has rc.d/localdaemon not name local scripts
X-Send-Pr-Version: www-2.3

>Number:         68525
>Category:       conf
>Synopsis:       Loader's verbose boot mode has rc.d/localdaemon not name local scripts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    matteo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 30 18:20:34 GMT 2004
>Closed-Date:    Sat Jun 19 04:41:44 UTC 2010
>Last-Modified:  Sat Jun 19 04:41:44 UTC 2010
>Originator:     Craig Carey
>Release:        FreeBSD 5.2-CURRENT
>Organization:
>Environment:
i386
>Description:

The Verbose boot logging of the loader is not verbose enough: nothing is displayed to the console when /etc/rc.d/localdaemon is running scripts in "/usr/local/etc/rc.d/".

The ltmdm.sh script in /use/local/etc/rc.d was crashing after an upgrade from FreeBSD 5.1 to 5.2. (ltmdm.sh is of the the Lucent Winmodem FreeBSD port).

Because the verbose boot mode is not verbose, echo lines would be added to scripts to diagnose the cause for the failure to boot.

At least the single user boot mode ran.

Also /etc/rc does not name every script when verbose mode was selected at the loader's menu. The verbose mode seemingly ought name the script that killed the boot (particularly when every option at the loader prompt won't get the FreeBSD system started).



>How-To-Repeat:
Select the verbose booting option at the loader prompt and have some scripts in /usr/local/etc/rc.d/
>Fix:
Add an "echo -n" line to "/etc/rc.d/localdaemon", and some other lines may be added in places.
>Release-Note:
>Audit-Trail:

From: Craig Carey <snowfall@gmx.co.uk>
To: freebsd-gnats-submit@FreeBSD.org, research@ijs.co.nz
Cc:  
Subject: Re: conf/68525: Loader's verbose boot mode has
  rc.d/localdaemon not name local scripts
Date: Sat, 03 Jul 2004 18:39:47 +1200

 ----
 
 
 A repeat of the description of the issue (with lines now wrapped):
 
 When FreeBSD 5.2 is booted with verbose logging enabled ("Boot FreeBSD
 with verbose logging), and when a local script kills the boot-up, then
 that can happen without the script being named.
 
 An old Lucent winmodem script (/usr/local/etc/rc.d/ltmdm.sh) was
 stopping booting of FreeBSD 5.2 after an installworld.
 
 (The localdaemons script in /etc/rc.d/ was renamed to localpkg in
 2003.)
 
 
 Fix:
 
 The file /etc/rc.d/localpkg might have code like this, added to it:
 
 if [ `sysctl -n debug.bootverbose` -eq 1 ]; then
    echo "==>" ${script}
 fi
 
 ---- 
 
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: arved 
Responsible-Changed-When: Mon Aug 30 16:58:33 GMT 2004 
Responsible-Changed-Why:  
Over to /etc/rc.d/ maintainers for review 

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

From: Matteo Riondato <matteo@freebsd.org>
To: bug-followup@freebsd.org, research@ijs.co.nz, mtm@freebsd.org
Cc:  
Subject: Re: conf/68525: Loader's verbose boot mode has rc.d/localdaemon not name local scripts
Date: Sun, 26 Jun 2005 18:53:51 +0200

 Patch for this:
 
 --- /usr/src/etc/rc.d/localpkg	Thu Oct  7 15:55:26 2004
 +++ localpkg	Sun Jun 19 08:22:17 2005
 @@ -40,6 +40,9 @@
  			if [ -x "${script}" ]; then
  				(set -T
  				trap 'exit 1' 2
 +				if [ `sysctl -n debug.bootverbose` -eq 1 ]; then
 +					echo "==>" ${script}
 +				fi
  				${script} start)
  			elif [ -f "${script}" -o -L "${script}" ]; then
  				echo -n " (skipping ${script##*/}, not executable)"
 
 This can be found at http://people.freebsd.org/~matteo/diff/localpkg.diff 
 Best Regards
 -- 
 Matteo Riondato
 FreeBSD Volunteer (http://freebsd.org)
 G.U.F.I. Staff Member (http://www.gufi.org)
 FreeSBIE Developer (http://www.freesbie.org)
State-Changed-From-To: open->patched 
State-Changed-By: matteo 
State-Changed-When: Sun Feb 12 10:06:31 UTC 2006 
State-Changed-Why:  
Fixed in HEAD 


Responsible-Changed-From-To: freebsd-rc->matteo 
Responsible-Changed-By: matteo 
Responsible-Changed-When: Sun Feb 12 10:06:31 UTC 2006 
Responsible-Changed-Why:  
I will handle the MFC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68525 
State-Changed-From-To: patched->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Jun 19 04:41:17 UTC 2010 
State-Changed-Why:  
This PR is OBE. 

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