tmatilai / vagrant-proxyconf

Vagrant plugin that configures the virtual machine to use proxies
MIT License
531 stars 74 forks source link

Proxy configuration outside of a login shell #58

Closed williambailey closed 10 years ago

williambailey commented 10 years ago

I'm wondering if it would be a good idea to have the option to update /etc/environment so that any proxy environment variables persist when using a non login shell.

By default vagrant uses bash -l to run commands via ssh however as witnessed by recent vagrant-omnibus changes sometimes a different shell is used and that shell might not process profile.d configuration. By having items in /etc/environment it should ensure that any proxy environmental variables are always available and therefore respected by any shell.

johnbellone commented 10 years ago

@tmatilai Am a little bias since I work with the good sir @williambailey. Since this stemmed from a FreeBSD issue brought up in this vagrant-omnibus change perhaps we should just make an addition of a FreeBSD host capability and write to /etc/environment since it doesn't ship with bash?

tmatilai commented 10 years ago

Hi there!

Agreed. That should also fix issue with test-kitchen which currently won't read /etc/profile, but should read /etc/environment. I'm fine writing our configuration to both. Only thing is that we should try to not override other configuration in /etc/environment.

Adding support for other that Linux guests is really great. There just haven't been any requests for them before.

I would be happy to see PRs for this. Personally I'm really busy at work with a project for the next couple of weeks, so can't promise anything before May/June.

reneoelke commented 10 years ago

I tried to develop this feature but i'm not aruby developer. So it would be nice that some one else could implement this important feature. Lot's of proxy problems would be solved with /etc/environment proxy settings.

tmatilai commented 10 years ago

Unless someone else takes this before, I definitely will work for this the next time I find a couple of hours FOSS time and energy, hopefully on the coming weekend.

tmatilai commented 10 years ago

PR #67 tries to implement this. Feel free to test. =)

reneoelke commented 10 years ago

Thanks. Really good work.