From mike_makonnen@yahoo.com  Sun Apr 15 06:37:24 2001
Return-Path: <mike_makonnen@yahoo.com>
Received: from mta6.snfc21.pbi.net (mta6.snfc21.pbi.net [206.13.28.240])
	by hub.freebsd.org (Postfix) with ESMTP id E931737B43E
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Apr 2001 06:37:23 -0700 (PDT)
	(envelope-from mike_makonnen@yahoo.com)
Received: from blackbox.pacbell.net ([64.166.84.59])
 by mta6.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9)
 with ESMTP id <0GBU00AN55U27D@mta6.snfc21.pbi.net> for
 FreeBSD-gnats-submit@freebsd.org; Sun, 15 Apr 2001 06:37:14 -0700 (PDT)
Received: (from mikem@localhost) by blackbox.pacbell.net (8.11.2/8.11.3)
 id f3FDeHM00701; Sun, 15 Apr 2001 06:40:17 -0700 (PDT envelope-from mikem)
Message-Id: <200104151340.f3FDeHM00701@blackbox.pacbell.net>
Date: Sun, 15 Apr 2001 06:40:17 -0700 (PDT)
From: mikem <mike_makonnen@yahoo.com>
Reply-To: mike_makonnen@yahoo.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] In /etc/rc, in symlinking /dev/log, the -h switch is used in a test
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26596
>Category:       misc
>Synopsis:       [PATCH] In /etc/rc, in symlinking /dev/log, the -h switch is used in a test
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 15 06:40:01 PDT 2001
>Closed-Date:    Sun Apr 15 06:44:18 PDT 2001
>Last-Modified:  Sun Apr 15 06:44:34 PDT 2001
>Originator:     mikem
>Release:        FreeBSD 4.3-BETA i386
>Organization:
>Environment:
System: FreeBSD blackbox.pacbell.net 4.3-BETA FreeBSD 4.3-BETA #1: Thu Mar 15 01:04:31 PST 2001 root@blackbox:/usr/obj/usr/src/sys/BLACKBOX i386


	
>Description:
In the /etc/rc startup script a soft link is created from /var/run/log to
/dev/log like this: if [ ! -h /dev/log ]; 
The man page for test(1) says that the -h switch is depracated and that
users should NOT rely on it being available. It suggest the -L switch instead.
They both do the same thing: check for the existence of the symbolic link.

	
>How-To-Repeat:
grep ' -h ' /etc/rc

	
>Fix:
This is the diff for the fix:

*** rc.modified Sun Apr 15 05:52:23 2001
--- rc  Sun Apr 15 05:52:30 2001
***************
*** 350,356 ****
  [Yy][Ee][Ss])
        # Transitional symlink (for the next couple of years :) until all
        # binaries have had a chance to move towards /var/run/log.
!       if [ ! -h /dev/log ]; then
                # might complain for r/o root f/s
                ln -sf /var/run/log /dev/log
        fi
--- 350,356 ----
  [Yy][Ee][Ss])
        # Transitional symlink (for the next couple of years :) until all
        # binaries have had a chance to move towards /var/run/log.
!       if [ ! -L /dev/log ]; then
                # might complain for r/o root f/s
                ln -sf /var/run/log /dev/log
        fi


	
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Sun Apr 15 06:44:18 PDT 2001 
State-Changed-Why:  
committed, thanks! 


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