Commit 16ec1402 authored by kharade's avatar kharade

fixing some warning and errors

parent f29b0018
......@@ -166,7 +166,7 @@ compilations() {
echo_info "Compilation log for $1 is here: $dlog/$2.txt"
cd $OPENAIRCN_DIR/$1/
{
make build
make build-release | tee $dlog/$2.txt
if grep -q "@@ Installing vpp @@" "$dlog/$2.txt" ; then
echo_success "##### VPP Compiled Successfully #####"
else
......
......@@ -51,15 +51,11 @@ check_install_vpp_upf_deps() {
check_supported_distribution
[[ $? -ne 0 ]] && return $?
# prevent lock on /var/lib/dpkg/lock
if [[ $OS_DISTRO == "ubuntu" ]]; then
#$SUDO systemctl mask apt-daily.service
#$SUDO systemctl mask apt-daily.timer
#$SUDO systemctl mask apt-daily-upgrade.service
#$SUDO systemctl mask apt-daily-upgrade.timer
$SUDO sed -i 's/1/0/g' /etc/apt/apt.conf.d/10periodic
if [[ $OS_RELEASE == "20.04" ]]; then
TZ=Europe/Paris
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
fi
# Compilers, generators, ...
if [[ $OS_DISTRO == "ubuntu" ]]; then
PACKAGE_LIST="\
......@@ -83,7 +79,7 @@ check_install_vpp_upf_deps() {
echo_fatal "$OS_DISTRO is not a supported distribution."
fi
echo "Install build tools"
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST
$SUDO $INSTALLER update && $SUDO $INSTALLER install $OPTION $PACKAGE_LIST
ret=$?;[[ $ret -ne 0 ]] && return $ret
check_install_vpp_upf_source_deps
......@@ -92,7 +88,7 @@ check_install_vpp_upf_deps() {
}
#-------------------------------------------------------------------------------
check_install_vpp_upf_deps() {
check_install_vpp_upf_source_deps() {
echo_info "Cloning fdio VPP $OPENAIRCN_DIR/"
if [ -d "$OPENAIRCN_DIR/vpp" ]; then
echo_error "clone failed : - vpp source is already present at $OPENAIRCN_DIR/... use option -w to wipe out vpp source"
......@@ -106,9 +102,9 @@ install_dep(){
GIT_BRANCH=stable/2101
pushd $OPENAIRCN_DIR/
git clone -b $GIT_BRANCH $GIT_URL
# echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes
# echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes
cd vpp && make install-dep
echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes
echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes
make install-dep -C vpp
return 0
}
......@@ -146,5 +142,15 @@ vpp_upf_init(){
cp $OPENAIRCN_DIR/scripts/upf_conf/* $OPENAIRCN_DIR/vpp
cp $OPENAIRCN_DIR/scripts/run.sh $OPENAIRCN_DIR/vpp
echo_info "Installing VPP"
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp_debug-native/vpp/lib/ /usr/lib/x86_64-linux-gnu/vpp_plugins/
# Copying binaries
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/bin/vpp /bin/
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/bin/vppctl /bin/
# Copying necessary libraries
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/vpp_plugins /usr/lib/x86_64-linux-gnu/vpp_plugins/
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvppinfra.so.21.01.1 /usr/lib/x86_64-linux-gnu/
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvnet.so.21.01.1 /usr/lib/x86_64-linux-gnu/
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvlibmemory.so.21.01.1 /usr/lib/x86_64-linux-gnu/
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvlib.so.21.01.1 /usr/lib/x86_64-linux-gnu/
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libsvm.so.21.01.1 /usr/lib/x86_64-linux-gnu/
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libnat.so.21.01.1 /usr/lib/x86_64-linux-gnu/
}
......@@ -142,7 +142,6 @@ function main()
mkdir -m 777 -p $dext
if [ $var_check_install_deps -gt 0 ];then
disable_ipv6
check_install_vpp_upf_deps $force $debug
if [[ $? -ne 0 ]]; then
echo_error "Error: VPP UPF deps installation failed"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment