From owner-freebsd-rc@FreeBSD.ORG Tue Jan 19 16:33:48 2010 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 361B2106566B for ; Tue, 19 Jan 2010 16:33:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5F28FC15 for ; Tue, 19 Jan 2010 16:33:47 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0JGEVb0041485 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 19 Jan 2010 18:14:31 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0JGEVCP072983 for ; Tue, 19 Jan 2010 18:14:31 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0JGEVCF072982 for rc@freebsd.org; Tue, 19 Jan 2010 18:14:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 19 Jan 2010 18:14:31 +0200 From: Kostik Belousov To: rc@freebsd.org Message-ID: <20100119161431.GI59590@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sl5MdczEF/OU2Miu" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Subject: etc/rc.d/devfs handling of symlinks X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 16:33:48 -0000 --sl5MdczEF/OU2Miu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --sl5MdczEF/OU2Miu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktV2mcACgkQC3+MBN1Mb4jWKACdEdsVhz2csgeH6NWs7DTQm27f wJkAoNwTZ3Pvjbb3gHRxhRwUZdU8HNV6 =K+v9 -----END PGP SIGNATURE----- --sl5MdczEF/OU2Miu--