feat: add Vagrant file and provisioning scripts
This commit is contained in:
commit
ad2a00a42c
25 changed files with 4805 additions and 0 deletions
scripts
35
scripts/00-network.sh
Normal file
35
scripts/00-network.sh
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
|
||||
|
||||
# APT proxy configuration
|
||||
if [ -z "$APT_PROXY" ]; then
|
||||
rm -f /etc/apt/apt.conf.d/90proxy
|
||||
sub=http:/https:
|
||||
else
|
||||
echo "Acquire::http::Proxy \"${APT_PROXY}\";" > /etc/apt/apt.conf.d/90proxy
|
||||
sub=https:/http:
|
||||
fi
|
||||
sed -i "s/$sub/g" /etc/apt/sources.list `find /etc/apt/sources.list.d -name '*.list'`
|
||||
|
||||
# Ensure systemd-resolved is actually installed
|
||||
apt-get update
|
||||
apt-get install -y systemd-resolved
|
||||
|
||||
cat >/etc/systemd/network/eth0.network <<EOF
|
||||
[Match]
|
||||
Name=eth0
|
||||
|
||||
[Network]
|
||||
LinkLocalAddressing=no
|
||||
DHCP=ipv4
|
||||
EOF
|
||||
|
||||
systemctl enable systemd-networkd.service
|
||||
systemctl enable systemd-resolved.service
|
||||
|
||||
rm -f /etc/network/interfaces
|
||||
dpkg --purge resolvconf
|
||||
systemctl disable networking.service
|
||||
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
Loading…
Add table
Add a link
Reference in a new issue