From 7ed5cedde6fc0d5755a65ff5c3a023b3f8ae9b05 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 14 Nov 2024 16:36:06 +0100 Subject: [PATCH] fix --- configs/scripts/server.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configs/scripts/server.sh b/configs/scripts/server.sh index 51ee988..497647b 100755 --- a/configs/scripts/server.sh +++ b/configs/scripts/server.sh @@ -22,10 +22,9 @@ while true; do fi done -ip addr flush dev eth0 -ip addr add 192.168.1.1/24 dev eth0 +echo -e "\nauto eth0\niface eth0 inet static\n address 192.168.1.1\n netmask 255.255.255.0\n gateway 192.168.1.1" | tee -a /mnt/etc/network/interfaces -echo -e "\nauto eth0\niface eth0 inet static\n address 192.168.1.1\n netmask 255.255.255.0\n gateway 192.168.1.1" | tee -a /etc/network/interfaces +cp dhcpd.conf /mnt/etc/dhcp/ +sed -i 's/^INTERFACES=.*/INTERFACES="eth0"/' /mnt/etc/default/isc-dhcp-server -cp dhcpd.conf /etc/dhcp/dhcpd.conf -sed -i 's/^INTERFACES=.*/INTERFACES="eth0"/' /etc/default/isc-dhcp-server +read a