joininbox/ci/amd64/debian/scripts/networking.sh
openoms efad4a01ff
Standalone setup fixes (#153)
* use bitcoin binary in /usr/local/bin/
* fix hostname and related warnings
* fix ownership of possibly migrated files
* build: fix fail2ban, remove boot drive tweak
* FAQ: remove outdated entries
2024-05-22 12:27:02 +02:00

12 lines
500 B
Bash

#!/bin/sh -eux
# Disable Predictable Network Interface names and use eth0
sed -i 's/en[[:alnum:]]*/eth0/g' /etc/network/interfaces;
sed -i 's/GRUB_CMDLINE_LINUX="\(.*\)"/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 \1"/g' /etc/default/grub;
update-grub;
# Adding a 2 sec delay to the interface up, to make the dhclient happy
echo "pre-up sleep 2" >> /etc/network/interfaces
echo "$(hostname -I | awk '{print $1}') $(hostname)" >>/etc/hosts
echo "127.0.1.1 $(hostname)" >>/etc/hosts