Commit 9698e5ab authored by kharade's avatar kharade

fix apt-force

parent 16ec1402
......@@ -89,28 +89,32 @@ 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"
echo_error "Warning :- vpp source is already present at $OPENAIRCN_DIR/... use option -w to wipe out vpp source"
fi
install_dep
}
#-------------------------------------------------------------------------------
install_dep(){
if [ -d "$OPENAIRCN_DIR/vpp" ]; then
remove_vpp_source
fi
GIT_URL=https://github.com/fdio/vpp.git
GIT_BRANCH=stable/2101
pushd $OPENAIRCN_DIR/
echo_info "Cloning fdio VPP $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
$SUDO rm -rf /etc/apt/apt.conf.d/90forceyes
$SUDO sh -c 'echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes'
$SUDO sh -c 'echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes'
make install-dep -C vpp
return 0
}
remove_vpp_source(){
rm -rf $OPENAIRCN_DIR/vpp/
echo_fatal "Removed vpp source $OPENAIRCN_DIR/vpp"
echo_error "Removed vpp source $OPENAIRCN_DIR/vpp"
}
#-------------------------------------------------------------------------------
......@@ -143,14 +147,19 @@ vpp_upf_init(){
cp $OPENAIRCN_DIR/scripts/run.sh $OPENAIRCN_DIR/vpp
echo_info "Installing VPP"
# 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/
$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/
echo_info "Copied binaries to /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/
$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/
$SUDO ldconfig
echo_info "Copied libraries to /usr/lib/x86_64-linux-gnu/"
$SUDO groupadd vpp
}
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