2 # Copyright (c) 2016 Cisco and/or its affiliates.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 # perform some very rudimentary platform detection
20 if command_exists lsb_release; then
21 lsb_dist="$(lsb_release -si)"
23 if [ -z "$lsb_dist" ] && [ -r /etc/lsb-release ]; then
24 lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")"
26 if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then
29 if [ -z "$lsb_dist" ] && [ -r /etc/centos-release ]; then
32 if [ -z "$lsb_dist" ] && [ -r /etc/os-release ]; then
33 lsb_dist="$(. /etc/os-release && echo "$ID")"
36 lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')"
38 fedora|centos|ubuntu|debian)
41 echo "Operating system [$lsb_dist] is unsupported"
57 echo "$LSB is not supported"
62 sudo mkdir $ROOTDIR/vpp
63 sudo mkdir $ROOTDIR/vpp/vpp-config
64 sudo mkdir $ROOTDIR/vpp/vpp-config/dryrun
65 sudo mkdir $ROOTDIR/vpp/vpp-config/scripts
66 sudo mkdir $ROOTDIR/vpp/vpp-config/configs
67 sudo mkdir $ROOTDIR/vpp/vpp-config/images
68 sudo mkdir $ROOTDIR/vpp/vpp-config/dryrun/default
69 sudo mkdir $ROOTDIR/vpp/vpp-config/dryrun/sysctl.d
70 sudo mkdir $ROOTDIR/vpp/vpp-config/dryrun/vpp
71 sudo cp scripts/dpdk-devbind.py $ROOTDIR/vpp/vpp-config/scripts/.
72 sudo cp data/auto-config.yaml $ROOTDIR/vpp/vpp-config/configs/.
73 sudo cp data/cloud-config.iso $ROOTDIR/vpp/vpp-config/configs/.
74 sudo cp data/iperf-centos.xml.template $ROOTDIR/vpp/vpp-config/configs/.
75 sudo cp data/iperf-ubuntu.xml.template $ROOTDIR/vpp/vpp-config/configs/.
76 sudo cp data/80-vpp.conf.template $ROOTDIR/vpp/vpp-config/dryrun/sysctl.d/.
77 sudo cp data/grub.template $ROOTDIR/vpp/vpp-config/dryrun/default/.
78 sudo cp data/startup.conf.template $ROOTDIR/vpp/vpp-config/dryrun/vpp/.