Add empty IFS for single var reads

This commit is contained in:
Lucas Gabriel Vuotto 2024-02-05 16:06:50 +00:00
parent 134c479e36
commit 49d068aad3
6 changed files with 7 additions and 7 deletions

View file

@ -23,7 +23,7 @@ renew_dhcp_if_needed() {
iface=$1
hostname_if=/etc/hostname."$iface"
[ ! -r "$hostname_if" ] && return
while read -r line; do
while IFS= read -r line; do
[ "$line" = dhcp ] && dhclient "$iface" && break
done <"$hostname_if"
}