Browse files

really add second postinstall script

Signed-off-by: Dave Simons <dave@inuits.be>
  • Loading branch information...
1 parent 47e199b commit 24b2b5d834c6f6ba8597ec049aee349f2b803655 Dave Simons committed Aug 3, 2011
Showing with 28 additions and 0 deletions.
  1. +28 −0 templates/archlinux-x86_64-netboot/postinstall2.sh
View
28 templates/archlinux-x86_64-netboot/postinstall2.sh
@@ -0,0 +1,28 @@
+# install virtualbox guest additions
+VBOX_VERSION=$(cat /root/.vbox_version)
+cd /tmp
+wget http://download.virtualbox.org/virtualbox/"$VBOX_VERSION"/VBoxGuestAdditions_"$VBOX_VERSION".iso
+mount -o loop VBoxGuestAdditions_"$VBOX_VERSION".iso /mnt
+sh /mnt/VBoxLinuxAdditions.run
+umount /mnt
+rm VBoxGuestAdditions_"$VBOX_VERSION".iso
+
+# host-only networking
+cat >> /etc/rc.local <<EOF
+# enable DHCP at boot on eth0
+# See https://wiki.archlinux.org/index.php/Network#DHCP_fails_at_boot
+dhcpcd -k eth0
+dhcpcd -nd eth0
+EOF
+
+# clean out pacman cache
+pacman -Scc<<EOF
+y
+y
+EOF
+
+# zero out the fs
+dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
+
+# and the final reboot!
+#reboot

0 comments on commit 24b2b5d

Please sign in to comment.