* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
static char copyright
[] =
"@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
static char sccsid
[] = "@(#)chroot.c 8.1 (Berkeley) %G%";
while ((ch
= getopt(argc
, argv
, "")) != EOF
)
if (chdir(argv
[0]) || chroot("."))
execvp(argv
[1], &argv
[1]);
if (!(shell
= getenv("SHELL")))
execlp(shell
, shell
, "-i", NULL
);
(void)fprintf(stderr
, "usage: chroot newroot [command]\n");