From owner-freebsd-bugs Sun Apr 15 6:40: 9 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 941FE37B509 for ; Sun, 15 Apr 2001 06:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3FDe1t32616; Sun, 15 Apr 2001 06:40:01 -0700 (PDT) (envelope-from gnats) Received: from mta6.snfc21.pbi.net (mta6.snfc21.pbi.net [206.13.28.240]) by hub.freebsd.org (Postfix) with ESMTP id E931737B43E for ; 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 Reply-To: mike_makonnen@yahoo.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: misc/26596: [PATCH] In /etc/rc, in symlinking /dev/log, the -h switch is used in a test Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Apr 15 06:40:01 PDT 2001 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message