From owner-freebsd-hackers Tue Jul 14 23:15:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA25907 for freebsd-hackers-outgoing; Tue, 14 Jul 1998 23:15:38 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp03.primenet.com (daemon@smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA25901 for ; Tue, 14 Jul 1998 23:15:35 -0700 (PDT) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id XAA16497; Tue, 14 Jul 1998 23:15:27 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp03.primenet.com, id smtpd016476; Tue Jul 14 23:15:24 1998 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id XAA06392; Tue, 14 Jul 1998 23:15:21 -0700 (MST) From: Terry Lambert Message-Id: <199807150615.XAA06392@usr06.primenet.com> Subject: Re: Improvemnet of ln(1). To: shigio@wafu.netgate.net (Shigio Yamaguchi) Date: Wed, 15 Jul 1998 06:15:21 +0000 (GMT) Cc: sbabkin@dcn.att.com, shigio@wafu.netgate.net, hackers@FreeBSD.ORG In-Reply-To: <199807141528.IAA18558@hub.freebsd.org> from "Shigio Yamaguchi" at Jul 15, 98 00:29:33 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Do you mean a symbolic link including root directory is useless? > You are right. My example was bad. > > How about this example? > > % ln -sr /usr/src/sys/kern/tty.c /usr/obj/usr/src/sys/kern/tty.c > % ls -l !$ > lrwxrwxrwx 1 shigio bin 33 Jul 14 23:56 /usr/obj/usr/src/sys/kern/tty.c -> > ../../../../../src/sys/kern/tty.c > > This symbolic link is solved in the '/usr' subdirectory. So, you can mount > /usr file system at any point. #!/bin/sh # # A script that needs to make non-existant absolute symlinks # TARGET=$1 if test "x$1" = "x" then echo "usage: mkbuild " >&2 exit 1 fi cd / # copy in the kernel so ps will work... cp kernel ${TARGET} # copy in the rest of the stuff to make the environment minimally functional cp -R bin ${TARGET} cp -R dev ${TARGET} cp -R etc ${TARGET} cp -R usr ${TARGET} cd b cp -R newsrc ${TARGET}/usr cd .. ln -s /usr/lib ${TARGET}/lib # make a non-existant link to the newsrc kernel sources.. ln -s /usr/newsrc/sys /sys # now enter into the isolated developement environment... chroot ${TARGET} /bin/sh exit 0 Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message