mirror of
https://github.com/elasticdog/packer-arch.git
synced 2026-07-17 16:36:26 +00:00
Disable "Predictable Network Interface Names" and force eth0
This commit is contained in:
parent
1e357e627b
commit
7c9d16d716
1 changed files with 3 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue