Skip to content

Commit

Permalink
bmx7: simplify start script
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed May 16, 2024
1 parent 270a417 commit 86f4a3e
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions protocols/bmx7_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,7 @@ id="$2"

echo "start bmx6 on ${address} in ${id}"

addr4() {
local mac=$(cat "/sys/class/net/$1/address")
IFS=':'; set $mac; unset IFS
[ "$6" = "ff" -o "$6" = "00" ] && set $1 $2 $3 $4 $5 "01"
printf "10.%d.%d.%d" 0x$4 0x$5 0x$6
}

addr6() {
local mac=$(cat "/sys/class/net/$1/address")
IFS=':'; set $mac; unset IFS
printf fdef:17a0:ffb1:300:$(printf %02x $((0x$1 ^ 2)))$2:${3}ff:fe$4:$5$6
}

ip link set "uplink" down
ip link set "uplink" up
ip -4 addr flush dev "uplink"
#ip -6 addr flush dev "uplink"
ip link set "uplink" up´

bmx7 --runtimeDir "/tmp/bmx7_${id}" --nodeRsaKey 6 /keyPath="/tmp/bmx7_${id}/rsa.der" --descSqnPath "/tmp/bmx7_${id}/descSqn" dev=uplink

0 comments on commit 86f4a3e

Please sign in to comment.