In a script that I'm still writing, I'm trying to build a package from source within a chroot'ed environment.
1) I could chroot and then cd to /usr/src and then manually install the package.
2) I could chroot and then run the installation script from the proper directory.
3) What I want to do and what's giving me issues, is to issue a command similar to this:
Code:
chroot /root/me/here cd /usr/src
...and have it do the installation after changing to /usr/src.
However, the error that I get is:
Code:
chroot: cannot run command `cd': No such file or directory
I can cd just fine when I manually chroot, but, how can I cd to a directory right from the chroot command option? I can't even find the cd program so that I can hard code the command. (I'm guessing because it's a builtin?) Thanks.