Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

fix passing exit status from shell provision to packer #45

Merged
merged 1 commit into from
Apr 5, 2014

Conversation

ranl
Copy link
Contributor

@ranl ranl commented Mar 25, 2014

when a shell provision returns with an exit code > 0 packer should fail the build.
from some reason /bin/bash shell of OpenSSH always return exit code 0 which could hide the fact that the provision failed..

this commit will configure the passwd to use the /bin/sh shell which returns the exit code as expected

Note: I didn't test this with vagrant

@joefitzgerald
Copy link
Owner

@ranl @sneal Have you had a chance to test if this works as expected with Vagrant?

@ranl
Copy link
Contributor Author

ranl commented Apr 5, 2014

@joefitzgerald I don't use Vagrant so I didn't test it... =/
I think that as long as you execute your commands under cmd /c it should work fine

@joefitzgerald
Copy link
Owner

So... When using Vagrant, the reality is that you should really be using WinRM / vagrant-windows - rendering this concern moot. I'm inclined to merge this. @sneal @dylanmei do you agree or have objections?

@dylanmei
Copy link
Collaborator

dylanmei commented Apr 5, 2014

I'm not in a position to test this this weekend, but the develop builds can have final say. I believe the change should be good for all of us. Not worried about Vagrant either.

@joefitzgerald
Copy link
Owner

develop build passed, I'm releasing this.

@joefitzgerald joefitzgerald merged commit dbb3e8f into joefitzgerald:master Apr 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants