Skip to content

Commit

Permalink
Check if busybox ipcalc is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausKlein committed Mar 13, 2024
1 parent a81bc35 commit 8ad0322
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pipework
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,9 @@ else
ip netns exec "$NSPID" "$DHCP_CLIENT" -q "$CONTAINER_IFNAME" -h "$GUESTNAME"
;;
"")
if installed ipcalc; then
eval $(ipcalc -b $IPADDR)
# Note: expected busybox ipcalc! CK
if installed busybox; then
eval $(busybox ipcalc -b $IPADDR)
ip netns exec "$NSPID" ip "$FAMILY_FLAG" addr add "$IPADDR" brd "$BROADCAST" dev "$CONTAINER_IFNAME"
else
ip netns exec "$NSPID" ip "$FAMILY_FLAG" addr add "$IPADDR" dev "$CONTAINER_IFNAME"
Expand Down

0 comments on commit 8ad0322

Please sign in to comment.