mirror of
https://github.com/bin456789/reinstall.git
synced 2026-04-09 01:17:45 +08:00
nixos: 在使用DHCP的时候显式设置useDHCP=true; (#587)
This commit is contained in:
7
trans.sh
7
trans.sh
@ -1263,6 +1263,13 @@ networking = {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
for ethx in $(get_eths); do
|
for ethx in $(get_eths); do
|
||||||
|
# ipv4 使用 DHCP 时显式开启 useDHCP
|
||||||
|
if is_dhcpv4; then
|
||||||
|
cat <<EOF >>$conf_file
|
||||||
|
interfaces.$ethx.useDHCP = true;
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# ipv4
|
# ipv4
|
||||||
if is_staticv4; then
|
if is_staticv4; then
|
||||||
get_netconf_to ipv4_addr
|
get_netconf_to ipv4_addr
|
||||||
|
|||||||
Reference in New Issue
Block a user