Xref: utzoo alt.sources:1480 comp.lang.perl:300 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!tut.cis.ohio-state.edu!ucbvax!decwrl!orc!mipos3!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: alt.sources,comp.lang.perl Subject: Perl version of chroot (was Re: [comp.sys.tahoe] Re: Need "chroot(8)" Sources) Message-ID: <1990Feb6.225517.16646@iwarp.intel.com> Date: 6 Feb 90 22:55:17 GMT References: <10783@stag.math.lsa.umich.edu> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 34 In-Reply-To: bostic@ucbvax.BERKELEY.EDU (Keith Bostic) In article <10783@stag.math.lsa.umich.edu>, bostic@ucbvax (Keith Bostic) writes: | | [This is an experimental alt.sources re-posting from the newsgroup(s) | comp.sys.tahoe. Comments on this service to emv@math.lsa.umich.edu | (Edward Vielmetti).] | | | In article <1990Jan22.172627.16417@uncecs.edu>, khj@uncecs.edu (Kenneth H. Jacker) writes: | > I have looked through the entire /tahoe/* tree, as well as the archives | > on uunet and ucbvax, but still have been unable to locate machine | > readable copies of | > | > Makefile, chroot.8, chroot.c, pathnames.h and strerror.c | | Here's chroot and strerror.c. | | --keith [source deleted] Here's the Perl version: #!/usr/bin/perl die "Missing new root" unless $#ARGV > -1; $newroot = shift; @ARGV = ($ENV{'SHELL'} || '/bin/sh') unless $#ARGV > -1; chroot $newroot || die "Cannot chroot $newroot ($!)"; exec @ARGV || die "Cannot exec @ARGV ($!)"; Just another Perl hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/