This commit is contained in:
Artur Gurgul 2025-08-28 17:48:34 +02:00
parent 764967c8e0
commit 93f402b012
9 changed files with 299 additions and 4 deletions

20
bin/recipes/net/net-up Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
sudo mkdir -p /etc/systemd/network
cat <<'EOF' | sudo tee /etc/systemd/network/20-enp0s1.network
[Match]
Name=enp0s1
[Network]
DHCP=yes
EOF
sudo systemctl enable --now systemd-networkd
sudo systemctl enable --now systemd-resolved
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo ip link set enp0s1 up
sudo networkctl reload
sudo networkctl reconfigure enp0s1