From 0207c20c9303e8dd4641c572ebbaf9e27f3e146a Mon Sep 17 00:00:00 2001 From: akarin233 Date: Wed, 5 Feb 2025 15:27:06 +0800 Subject: [PATCH] Update initrd-network.sh --- initrd-network.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/initrd-network.sh b/initrd-network.sh index 6836278..ff0b464 100644 --- a/initrd-network.sh +++ b/initrd-network.sh @@ -8,6 +8,7 @@ ipv4_gateway=$3 ipv6_addr=$4 ipv6_gateway=$5 is_in_china=$6 +static=$7 DHCP_TIMEOUT=15 DNS_FILE_TIMEOUT=5 @@ -443,6 +444,7 @@ netconf="/dev/netconf/$ethx" mkdir -p "$netconf" $dhcpv4 && echo 1 >"$netconf/dhcpv4" || echo 0 >"$netconf/dhcpv4" $should_disable_ra_slaac && echo 1 >"$netconf/should_disable_ra_slaac" || echo 0 >"$netconf/should_disable_ra_slaac" +[ "$static" = 1 ] && echo 1 >"$netconf/force_static" || echo 0 >"$netconf/force_static" $is_in_china && echo 1 >"$netconf/is_in_china" || echo 0 >"$netconf/is_in_china" echo "$ethx" >"$netconf/ethx" echo "$mac_addr" >"$netconf/mac_addr"