-
Notifications
You must be signed in to change notification settings - Fork 13
/
du-docker-entrypoint.sh
executable file
·33 lines (28 loc) · 1.12 KB
/
du-docker-entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export DU_LOCAL=`ifconfig eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}'`
echo DU_F1C IP address is "$DU_LOCAL"
CU_IP=`nslookup ${CU_ADDRESS} | grep Address | awk 'NR==2' | cut -d: -f2 | awk '{print $1}'`
if [ -z "$CU_IP" ]
then
echo "DU not able to fetch CU Service IP address"
echo "DU Stopped......!"
exit
else
echo CU Service IP address is "$CU_IP"
fi
CU_SVC_IP="$CU_IP"
RIC_IP=`nslookup ${RIC_ADDRESS} | grep Address | awk 'NR==2' | cut -d: -f2 | awk '{print $1}'`
if [ -z "$RIC_IP" ]
then
echo "DU not able to fetch RIC Service IP address"
echo "DU Stopped......!"
exit
else
echo RIC Service IP address is "$RIC_IP"
fi
RIC_SVC_IP="$RIC_IP"
sed -i "s/192.168.130.82/$CU_IP/g" l2/build/config/fdd_odu_config.xml l2/build/config/tdd_odu_config.xml
sed -i "s/192.168.130.80/$RIC_IP/g" l2/build/config/fdd_odu_config.xml l2/build/config/tdd_odu_config.xml
sed -i "s/192.168.130.81/$DU_LOCAL/g" l2/build/config/fdd_odu_config.xml l2/build/config/tdd_odu_config.xml
cd l2/build/odu
sed -i "s/UCONTAINERIZE/DCONTAINERIZE/g" makefile
make clean_odu odu MACHINE=BIT64 MODE=FDD