Allow different receiver pcs

This commit is contained in:
2024-02-09 12:33:00 +01:00
parent 9ecc784cae
commit a901bc5d94
5 changed files with 86 additions and 27 deletions

44
pccalib.sh Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
#set the destination mac address
#source pccalib.sh mpc2012/pc-jungfrau-test
if [[ "$0" == *"pccalib.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
echo $0
echo "Assigning MAC address " $1
if [[ $1 == "pc-jungfrau-test" ]]; then
export DSTMAC="00:02:c9:30:68:31"
export DSTIP="10.1.1.110"
export SRCIP="10.1.1.9"
echo "DSTMAC" $DSTMAC
echo "DSTIP" $DSTIP
echo "SRCIP" $SRCIP
elif [[ $1 == "mpc2012" ]]; then
export DSTMAC="3C:FD:FE:A2:14:DB"
export DSTIP="10.1.1.105"
export SRCIP="10.1.1.9"
echo "DSTMAC" $DSTMAC
echo "DSTIP" $DSTIP
echo "SRCIP" $SRCIP
else
echo "Incorrect pc name. Try again"
unset DSTMAC
unset DSTIP
unset SRCIP
fi