Browse Source

Set default for dpdk_socket_mem

To avoid unbound variable assign set empty value as a default.

Change-Id: If3b7c3bcab6b18d4913db3b81f0269cb73ef894a
Michael Polenchuk 2 years ago
parent
commit
137748b828
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      deployment_scripts/install.sh

+ 3
- 3
deployment_scripts/install.sh View File

@@ -8,7 +8,7 @@ cd $INSTALL_HOME
8 8
 host=$1
9 9
 nsh=$2
10 10
 dpdk=$3
11
-dpdk_socket_mem=$4
11
+dpdk_socket_mem=${4:-''}
12 12
 
13 13
 
14 14
 if [ $nsh = 'true' ]
@@ -31,7 +31,7 @@ else
31 31
     dpkg -i openvswitch-common_2.5.90-1_amd64.deb
32 32
     dpkg -i openvswitch-switch_2.5.90-1_amd64.deb
33 33
     dpkg -i python-openvswitch_2.5.90-1_all.deb
34
-    if [ $dpdk = 'true' ]
34
+    if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]]
35 35
     then
36 36
         dpkg -i libxenstore3.0*.deb
37 37
         dpkg -i libdpdk0_16.07-1_amd64.deb
@@ -43,7 +43,7 @@ else
43 43
         service dpdk start
44 44
 
45 45
         ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
46
-        [ -n $dpdk_socket_mem ] && ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
46
+        ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$dpdk_socket_mem"
47 47
 
48 48
         service openvswitch-switch restart
49 49
     fi

Loading…
Cancel
Save