From owner-freebsd-questions@FreeBSD.ORG Fri Mar 27 10:34:16 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAD31106564A for ; Fri, 27 Mar 2009 10:34:16 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id B9CE38FC14 for ; Fri, 27 Mar 2009 10:34:16 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from sarevok.dnr.servegame.org (gate.lan.rachie.is-a-geek.net [192.168.2.10]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 696357E818; Fri, 27 Mar 2009 02:34:15 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Fri, 27 Mar 2009 11:32:58 +0100 User-Agent: KMail/1.11.0 (FreeBSD/8.0-CURRENT; KDE/4.2.0; i386; ; ) References: <20090326212045.GB3134@sushi.pseudo.local> In-Reply-To: <20090326212045.GB3134@sushi.pseudo.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903271132.58872.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: Tobias Rehbein Subject: Re: [perl] sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK) fails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 10:34:17 -0000 On Thursday 26 March 2009 22:20:45 Tobias Rehbein wrote: > Hi all. > > I have a perl script which seems to work fine under Linux but fails on > FreeBSD. The Problem is the line: > > sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK) > > After this line the following evaluates to true: > > $! eq "No such file or directory." If you're running this in a jail, then cd0 is hidden by devfs, hence the ENOENT. You will need to provide a jail specific ruleset, or override devfsrules_jail from /etc/defaults/devfs.rules in /etc/devfs.rules so it applies to all jails without modification to /etc/rc.conf. -- Mel