-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Clean up unneeded packages. | ||
#yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts | ||
yum -y clean all | ||
|
||
# Ensure that udev doesn't screw us with network device naming. | ||
ln -sf /dev/null /lib/udev/rules.d/75-persistent-net-generator.rules | ||
rm -f /etc/udev/rules.d/70-persistent-net.rules | ||
|
||
# On startup, remove HWADDR from the eth0 interface. | ||
cp -f /etc/sysconfig/network-scripts/ifcfg-eth0 /tmp/eth0 | ||
sed "/^HWADDR/d" /tmp/eth0 > /etc/sysconfig/network-scripts/ifcfg-eth0 | ||
sed -e "s/dhcp/none/;s/eth0/eth1/" /etc/sysconfig/network-scripts/ifcfg-eth0 > /etc/sysconfig/network-scripts/ifcfg-eth1 | ||
|
||
# Prevent way too much CPU usage in VirtualBox by disabling APIC. | ||
sed -e 's/\tkernel.*/& noapic/' /boot/grub/grub.conf > /tmp/new_grub.conf | ||
mv /boot/grub/grub.conf /boot/grub/grub.conf.bak | ||
mv /tmp/new_grub.conf /boot/grub/grub.conf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Vagrant specific | ||
date > /etc/vagrant_box_build_time | ||
|
||
# Installing vagrant keys | ||
mkdir -pm 700 /home/vagrant/.ssh | ||
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys | ||
chmod 0600 /home/vagrant/.ssh/authorized_keys | ||
chown -R vagrant /home/vagrant/.ssh | ||
|
||
# Customize the message of the day | ||
echo 'Welcome to your Vagrant-built virtual machine.' > /etc/motd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Bail if we are not running inside VirtualBox. | ||
[ `facter virtual` == "virtualbox" ] || { | ||
exit 0 | ||
} | ||
|
||
mkdir -p /mnt/virtualbox | ||
mount -o loop /home/vagrant/VBoxGuest*.iso /mnt/virtualbox | ||
sh /mnt/virtualbox/VBoxLinuxAdditions.run | ||
umount /mnt/virtualbox | ||
rm -rf /home/vagrant/VBoxGuest*.iso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Zero out the free space to save space in the final image: | ||
dd if=/dev/zero of=/EMPTY bs=1M | ||
rm -f /EMPTY | ||
|
||
# Sync to ensure that the delete completes before this moves on. | ||
sync | ||
sync | ||
sync |