opscode/bento — pull request #174 by rjocoleman (2014-02-22 20:30:03+00:00)
Title: Move single-request-reopen into OS specific scripts

related to #171

@juliandunn I've completed this move/change.

I established that Fedora 19 and 20 show the same issue under virtualbox.

1. I removed the line from `packer/scripts/centos/ks.cfg`
2. Added discrete `fix-slow-dns.sh` scripts for Fedora and Centos/RHEL. These are at the start of post-install script execution incase any later post-install scripts download things so they'll benefit from the fix.
3. Limited the execution of this post-install script to virtualbox only.
4. I moved the Centos into `/etc/sysconfig/network`, this is used when `resolv.conf` is generated when dhclient runs. `resolv.conf` can be overwritten and the change lost otherwise.
5. Fedora uses NetworkManager to generate `resolv.conf`, added a script to hook into that to add the required line to `resolv.conf`
6. Fedora 19 has a known bug with the install media version of NetworkManager that prevents dispatchers (the hook I'm using) from running so on F19 updated NM to mitigate this.
7. I built new boxes with the changes applied and verified that they were showing the desired behaviour, as below.

In short this should apply only the the effected operating systems and persist past network changes/reboots.

_How to reproduce:_

To reproduce this issue I set up a basic Vagrant test: https://gist.github.com/rjocoleman/9161682

Bad:
```shell
[default] Running: inline script
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 26 0 0:00:08 0:00:08 --:--:-- 47
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 34 0 0:00:06 0:00:06 --:--:-- 57
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 34 0 0:00:06 0:00:06 --:--:-- 58
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 33 0 0:00:06 0:00:06 --:--:-- 54
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 34 0 0:00:06 0:00:06 --:--:-- 58
```

Fixed
```shell
[default] Running: inline script
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 323 0 --:--:-- --:--:-- --:--:-- 323
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 305 0 --:--:-- --:--:-- --:--:-- 305
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 289 0 --:--:-- --:--:-- --:--:-- 289
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 274 0 --:--:-- --:--:-- --:--:-- 274
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 220 100 220 0 0 326 0 --:--:-- --:--:-- --:--:-- 326
```