Skip to content

Commit

Permalink
Make OVS-DPDK start script more robust
Browse files Browse the repository at this point in the history
Script checks if CONFIG_FILE exists, if not create one with default
values. However, if /opt/ovs-config/ directory does not exist then
the print command fails. mkdir -p creates dir if it does not exist.
  • Loading branch information
garyloug committed Jun 5, 2020
1 parent 3bfc39f commit bd1f2ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dist/images/start-ovs-dpdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ CONFIG_FILE=/opt/ovs-config/config.cfg

# Check if config file exists, create default one if not
if ! test -f "$CONFIG_FILE"; then
mkdir -p $(dirname ${CONFIG_FILE})
printf %s\\n {dpdk-socket-mem=\"1024\",dpdk-init=true,dpdk-hugepage-dir=/dev/hugepages} > $CONFIG_FILE
fi

Expand Down

0 comments on commit bd1f2ac

Please sign in to comment.