[xen-tools-discuss] Roles and many chroot commands

Bubba Sour bubbasour at gmail.com
Fri Sep 7 10:06:56 CEST 2012


>> chroot ${prefix} /bin/bash -e -x
>>
>> command 1
>> command 2
>> ...
>>
>> exit
>>
>> Are there any better way of executing several chrooted commands?
>
> You have to redirect STDIN to bash, e.g. with a so called "here
> document":
>
> chroot ${prefix} /bin/bash -e -x <<EOF
> echo foobar
> echo fnord
> EOF

It worked! Thanks!


More information about the xen-tools-discuss mailing list