etc/rc.d/devfs handling of symlinks
Kostik Belousov
kostikbel at gmail.com
Tue Jan 19 16:33:48 UTC 2010
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20100119/6ce388f5/attachment.pgp
More information about the freebsd-rc
mailing list