Skip to content

Commit

Permalink
do not rely entirely on mac0
Browse files Browse the repository at this point in the history
  • Loading branch information
mastacontrola committed Jun 3, 2024
1 parent 345a536 commit e8d3430
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Buildroot/board/FOG/FOS/rootfs_overlay/etc/init.d/S40network
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@ for iface in $ifaces; do
# NOTE: the link to web is kind of important, just
# exiting on dhcp request is not sufficient.
if [[ $ustat -eq 0 && $cstat -eq 0 ]]; then
if [[ ! -z $mac0 && ! -z $domacset ]]; then
if [[ ! -z $domacset ]]; then
if [[ ! -z $setmacto ]]; then
mac0=$setmacto
# Update the mac address if the DoMACSet flag
# has been raised
ip link set dev $iface down
ip link set dev $iface address $setmacto
ip link set dev $iface up
else
ip link set dev $iface down
ip link set dev $iface address $mac0
ip link set dev $iface up
fi
# Update the mac address if the DoMACSet flag
# has been raised
ip link set dev $iface down
ip link set dev $iface address $mac0
ip link set dev $iface up
fi
exit 0
fi
Expand Down

0 comments on commit e8d3430

Please sign in to comment.