diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2021-08-08 20:46:01 -0400 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2021-11-16 11:51:19 +0000 |
commit | 850578a60d19e4266db1bcce52ddd5dd1d335480 (patch) | |
tree | e23579c0b4f1137d1503532d5d4c9c2a2b6b36ef /setup-interfaces.in | |
parent | a684ec45184afa92f60c41f450c1d4afa3833ac0 (diff) | |
download | alpine-conf-850578a60d19e4266db1bcce52ddd5dd1d335480.zip |
setup-interfaces: don't add hostname for dhcp (fixes #12886)
this doesn't work properly if someone changes hostname after install.
ifupdown-ng supports this automatically, and if someone manually
switches to ifupdown then they can manually add the hostname line.
Diffstat (limited to 'setup-interfaces.in')
-rw-r--r-- | setup-interfaces.in | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in index d7e53c6..4c227d5 100644 --- a/setup-interfaces.in +++ b/setup-interfaces.in @@ -481,7 +481,6 @@ prompt_for_interfaces() { echo "type=loopback" > 000~lo.conf echo "" > interface fi - hostname=$(cat $ROOT/etc/hostname 2>/dev/null) for i in *.conf ; do iface=$(basename $i .conf) @@ -514,10 +513,6 @@ prompt_for_interfaces() { echo -e "\tup ip link set \$IFACE up" >> interfaces echo -e "\tdown ip link set \$IFACE down" >> interfaces ;; - dhcp) - [ -n "$hostname" ] \ - && echo -e "\thostname $hostname" >> interfaces - ;; static) echo -e "\taddress $address" >> interfaces echo -e "\tnetmask $netmask" >> interfaces @@ -546,7 +541,6 @@ prompt_for_interfaces() { auto_setup() { local iface - local hostname=$(cat $ROOT/etc/hostname 2>/dev/null) for iface in $(available_ifaces); do if [ "$(cat /sys/class/net/$iface/operstate)" = "up" ]; then break @@ -560,9 +554,6 @@ auto_setup() { auto $iface iface $iface inet dhcp EOF - if [ -n "$hostname" ]; then - echo -e "\thostname $hostname" >> $ROOT/etc/network/interfaces - fi } ask_bridge= |