I would like to do something like this:
chroot /mount-point /path/to/script $var1 $var 2
Will this work? Will the chrooted Perl script be passed on these 2 parameters? If not, how to do this?
Otherwise, is there any way to simply do chroot
in the script, and then start doing commands such as
perl script.pl $var1 $var2 etc?
As I understand it, simply writing them sequentially in bash
will only get them executed after chroot
is finished, and control is returned back to where I don't have perl
installed (its a ramdisk running from PXE).