Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i want to do something like:

schroot -c name -u root "export A=3 && export B=4"

but i get the error:

Failed to execute “export”: No such file or directory

In other words, I want to be able to programmatically execute shell commands inside the schroot environment. What is the right way to get this behavior?

share|improve this question

3 Answers 3

schroot bash -c "export....

share|improve this answer

an echo solution is possible as :

echo "export A=3 && export B=4" | schroot -c name -u root 

I use this behavior for a svn/git buildpackaging bash

share|improve this answer

I think since export is a shell builtin that you'd need do do bash export for that to work. Try it again but with a real command.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.