From owner-freebsd-current Sat Feb 3 17:30:17 2001 Delivered-To: freebsd-current@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id A0F7137B4EC for ; Sat, 3 Feb 2001 17:29:59 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 4 Feb 2001 01:29:58 +0000 (GMT) Date: Sun, 4 Feb 2001 01:29:57 +0000 From: David Malone To: Warner Losh Cc: Peter Wemm , freebsd-current@FreeBSD.ORG Subject: Re: DEVFS newbie... Message-ID: <20010204012957.A96268@walton.maths.tcd.ie> References: <200102031748.f13HmuW44694@mobile.wemm.org> <200102031932.f13JWo961621@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200102031932.f13JWo961621@harmony.village.org>; from imp@harmony.village.org on Sat, Feb 03, 2001 at 12:32:50PM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Feb 03, 2001 at 12:32:50PM -0700, Warner Losh wrote: > In message <200102031748.f13HmuW44694@mobile.wemm.org> Peter Wemm writes: > : As bizzare as it sounds, I like Julian's hack for populating this stuff... > : ie: use a hard link to propagate nodes to the jailed /dev. > : > : eg: mount -t devfs -o empty /home/jail/dev > : ln /dev/null /home/jail/dev/null > : ln /dev/zero /home/jail/dev/zero > : ... > : mount -u -o ro /home/jail/dev > > But you can't do hard links accross file systems. Actually, you've always been able to do things like this. For example: ln /proc/curproc/file /test on a 3.X machine will produce a hard link to ln in / - it doesn't work any more 'cos /proc/curproc/file is now a soft link. I presume the same thing works with fdescfs. This is actually one nice feature Linux procfs has: I once was asked to look at a Linux box someone had broken into. They'd deleted all the files in /var/log, but hadn't HUPed syslogd - so I just hard linked them all back into place again. Not an every day use, but... David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message