mirror of
https://github.com/bin456789/reinstall.git
synced 2026-02-21 18:37:49 +08:00
添加 --static 参数,强制使用静态IP
This commit is contained in:
parent
513d4a364a
commit
058068f7b1
@ -8,6 +8,7 @@ ipv4_gateway=$3
|
||||
ipv6_addr=$4
|
||||
ipv6_gateway=$5
|
||||
is_in_china=$6
|
||||
force_static=$7
|
||||
|
||||
DHCP_TIMEOUT=15
|
||||
DNS_FILE_TIMEOUT=5
|
||||
@ -444,6 +445,7 @@ 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"
|
||||
$is_in_china && echo 1 >"$netconf/is_in_china" || echo 0 >"$netconf/is_in_china"
|
||||
$force_static && echo 1 >"$netconf/force_static" || echo 0 >"$netconf/force_static"
|
||||
echo "$ethx" >"$netconf/ethx"
|
||||
echo "$mac_addr" >"$netconf/mac_addr"
|
||||
echo "$ipv4_addr" >"$netconf/ipv4_addr"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user