Date: Sun, 15 Apr 2001 06:40:17 -0700 (PDT) From: mikem <mike_makonnen@yahoo.com> To: FreeBSD-gnats-submit@freebsd.org Subject: misc/26596: [PATCH] In /etc/rc, in symlinking /dev/log, the -h switch is used in a test Message-ID: <200104151340.f3FDeHM00701@blackbox.pacbell.net>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104151340.f3FDeHM00701>
