Date: Tue, 19 Jan 2010 18:14:31 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: rc@freebsd.org Subject: etc/rc.d/devfs handling of symlinks Message-ID: <20100119161431.GI59590@deviant.kiev.zoral.com.ua>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello,
It seems that /etc/rc.d/devfs is not quite correct in the handling of
symlinks. If symlink is established to a node in /dev subdirectory,
like the following line from /etc/devfs.conf:
link card1 dri/card0
(linking /dev/dri/card1 to /dev/dri/card0), then the test for existence
of the symlink source will fail.
Even more, I do not see a reason to test the mentioned existence, since
symlink may be usefully created in advance for dynamically created node.
Unless somebody objects, I intent to commit the following change.
Index: etc/rc.d/devfs
===================================================================
--- etc/rc.d/devfs (revision 202627)
+++ etc/rc.d/devfs (working copy)
@@ -44,7 +44,7 @@
while read action devicelist parameter; do
case "${action}" in
l*) for device in ${devicelist}; do
- if [ -c ${device} -a ! -e ${parameter} ]; then
+ if [ ! -e ${parameter} ]; then
ln -fs ${device} ${parameter}
fi
done
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
iEYEARECAAYFAktV2mcACgkQC3+MBN1Mb4jWKACdEdsVhz2csgeH6NWs7DTQm27f
wJkAoNwTZ3Pvjbb3gHRxhRwUZdU8HNV6
=K+v9
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100119161431.GI59590>
