diff --git a/tools/ovs-dpdkctl.sh b/tools/ovs-dpdkctl.sh
index 6c6bb5aae52e3405e136655675051849d4f1b12a..c24ab802f0e616d77dbf48a538145ea00b44ec93 100755
--- a/tools/ovs-dpdkctl.sh
+++ b/tools/ovs-dpdkctl.sh
@@ -348,6 +348,9 @@ function unconfigure_kernel_modules {
 }
 
 function install {
+    if [ ! -e "$CONFIG_FILE" ]; then
+        gen_config
+    fi
     configure_kernel_modules
     if [ ! -e "$SERVICE_FILE" ]; then
         install_service
@@ -356,9 +359,6 @@ function install {
         cp "$FULL_PATH" /bin/ovs-dpdkctl
         chmod +x /bin/ovs-dpdkctl
     fi
-    if [ ! -e "$CONFIG_FILE" ]; then
-        gen_config
-    fi
     systemctl start ovs-dpdkctl
     install_network_manager_conf
     if  [[ $(is_redhat_family) == 0 ]]; then