Skip to content

Commit

Permalink
[Backport release-24.05] nixos/networking-interfaces-scripted: use re…
Browse files Browse the repository at this point in the history
…ad -r (#363480)
  • Loading branch information
NickCao authored Dec 9, 2024
2 parents 7109b68 + e3949ee commit 785b59f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/tasks/network-interfaces-scripted.nix
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ let
preStop = ''
state="/run/nixos/network/routes/${i.name}"
if [ -e "$state" ]; then
while read cidr; do
while read -r cidr; do
echo -n "deleting route $cidr... "
ip route del "$cidr" dev "${i.name}" >/dev/null 2>&1 && echo "done" || echo "failed"
done < "$state"
Expand All @@ -246,7 +246,7 @@ let
state="/run/nixos/network/addresses/${i.name}"
if [ -e "$state" ]; then
while read cidr; do
while read -r cidr; do
echo -n "deleting address $cidr... "
ip addr del "$cidr" dev "${i.name}" >/dev/null 2>&1 && echo "done" || echo "failed"
done < "$state"
Expand Down

0 comments on commit 785b59f

Please sign in to comment.