Skip to content

Commit

Permalink
Merge pull request #1937 from DetMoerk/patch-1
Browse files Browse the repository at this point in the history
usage of ip instead ifconfig in  setup_network.sh
  • Loading branch information
benderl authored Oct 14, 2024
2 parents b7e7cc8 + f73ba0d commit d8bd46b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runs/setup_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ function setup_pnp_network() {
echo "my primary interface: $myNetDevice"
isSecondary=$(mosquitto_sub -t "openWB/general/extern" -p 1886 -C 1 -W 1 --quiet)
if [[ $isSecondary == "true" ]]; then
echo "running as secondary, disabling plug'n'play network"
sudo ifconfig "${myNetDevice}:0" down
echo "running as secondary, disabling plug'n'play network on dev $myNetDevice"
sudo ip addr del "$myVirtualIp/24" dev $myNetDevice
else
echo "running as primary, enabling plug'n'play network"
sudo ifconfig "${myNetDevice}:0" "$myVirtualIp" netmask 255.255.255.0 up
echo "running as primary, enabling plug'n'play network on dev $myNetDevice"
sudo ip addr add "$myVirtualIp/24" dev $myNetDevice
fi
}

Expand Down

0 comments on commit d8bd46b

Please sign in to comment.