From 7c9d16d716a930dc118a03ccbedbbd0a1e55abf6 Mon Sep 17 00:00:00 2001 From: Aaron Bull Schaefer Date: Thu, 22 Aug 2013 15:35:55 -0700 Subject: [PATCH] Disable "Predictable Network Interface Names" and force eth0 --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 9296276..c22e8ef 100644 --- a/install.sh +++ b/install.sh @@ -4,7 +4,6 @@ DISK='/dev/sda' FQDN='vagrant-arch.vagrantup.com' KEYMAP='us' LANGUAGE='en_US.UTF-8' -NIC_DEVICE='ens33' PASSWORD=$(/usr/bin/openssl passwd -crypt 'vagrant') TIMEZONE='UTC' @@ -55,13 +54,14 @@ add_config "/usr/bin/sed -i 's/#${LANGUAGE}/${LANGUAGE}/' /etc/locale.gen" add_config '/usr/bin/locale-gen' add_config '/usr/bin/mkinitcpio -p linux' add_config "/usr/bin/usermod --password ${PASSWORD} root" +add_config 'ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules' +add_config "/usr/bin/ln -s '/usr/lib/systemd/system/dhcpcd@.service' '/etc/systemd/system/multi-user.target.wants/dhcpcd@eth0.service'" +add_config "/usr/bin/sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config" add_config '/usr/bin/systemctl enable sshd.service' -add_config "/usr/bin/ln -s '/usr/lib/systemd/system/dhcpcd@.service' '/etc/systemd/system/multi-user.target.wants/dhcpcd@${NIC_DEVICE}.service'" add_config '/usr/bin/pacman -Rcns --noconfirm gptfdisk' add_config '/usr/bin/pacman -Scc --noconfirm' # Vagrant-specific configuration -add_config "/usr/bin/sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config" add_config "/usr/bin/useradd --password ${PASSWORD} --comment \"Vagrant User\" --create-home --gid users vagrant" add_config "echo 'Defaults env_keep += \"SSH_AUTH_SOCK\"' > /etc/sudoers.d/10_vagrant" add_config "echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/10_vagrant"