How can I configure Vagrant to set ```NM_CONTROLLED``` to ```yes``` value ?

206 views
Skip to first unread message

Stéphane Klein

unread,
Feb 4, 2016, 10:30:14 AM2/4/16
to Vagrant

Hi,


I use Vagrant + Centos 7.2


I've a bug with NM_CONTROLLED=no in /etc/sysconfig/network-scripts/ifcfg-eth0


How can I configure Vagrant to set NM_CONTROLLED to yes value ?


Context : http://lists.openshift.redhat.com/openshift-archives/users/2016-February/msg00006.html


Best regards,

Stephane

Alvaro Miranda Aguilera

unread,
Feb 5, 2016, 4:43:41 AM2/5/16
to vagra...@googlegroups.com

On Fri, Feb 5, 2016 at 4:30 AM, Stéphane Klein <con...@stephane-klein.info> wrote:
NM_CONTROLLED=no in /etc/sysconfig/network-scripts/ifcfg-eth0

Hello,

You can have a shell provisioner that run always. And does something like this.

grep 'NM_CONTROLLED=no' /etc/sysconfig/network-scripts/ifcfg-eth0 || sed -i -e 's/NM_CONTROLLED=no/NM_CONTROLLED=yes/' /etc/sysconfig/network-scripts/ifcfg-eth0


And in vagrant:

config.vm.provision "shell", run: "always", inline: "grep 'NM_CONTROLLED=no' /etc/sysconfig/network-scripts/ifcfg-eth0 && true || sed -i -e 's/NM_CONTROLLED=no/NM_CONTROLLED=yes/' /etc/sysconfig/network-scripts/ifcfg-eth0"


Alvaro.




Alan Crosswell

unread,
Jan 15, 2017, 5:18:20 PM1/15/17
to Vagrant
Stephanie, You posted this as an issue at https://github.com/mitchellh/vagrant/issues/6975 and it was closed as not a bug. I believe in fact it is. I've added a comment documenting what is happening. Can you please re-open the issue?

Thanks.

Alan Crosswell

unread,
Jan 15, 2017, 5:19:14 PM1/15/17
to Vagrant
Ugh, sorry for misspelling your name, Stephane!

Alan Crosswell

unread,
Jan 15, 2017, 10:47:08 PM1/15/17
to vagra...@googlegroups.com

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/qGKBh7TVwQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/f640f94d-d5da-432b-bd15-a2cc0e4fbe93%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alan Crosswell
Assoc. VP & CTO

Reply all
Reply to author
Forward
0 new messages