]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
Fixed execution of find command
authorTomek Mrugalski <tomasz@isc.org>
Wed, 6 Mar 2019 11:23:19 +0000 (12:23 +0100)
committerTomek Mrugalski <tomek@isc.org>
Wed, 6 Mar 2019 14:15:29 +0000 (09:15 -0500)
src/bin/admin/kea-admin.in

index faebb343698a894ecf37c0409f0eccf3db8cc2f3..cfad71f756af2d22ba88d7e299ce72b4c48d31c8 100644 (file)
@@ -260,7 +260,7 @@ mysql_upgrade() {
     fi
 
     # Check if there are any files in it
-    num_files=$(find ${scripts_dir}/mysql/upgrade*.sh -type f | wc -l)
+    num_files=$(find "${scripts_dir}/mysql" -name 'upgrade*.sh' -type f | wc -l)
     if [ "$num_files" -eq 0 ]; then
         log_error "No scripts in ${scripts_dir}/mysql or the directory is not readable or does not have any upgrade* scripts."
         exit 1
@@ -288,7 +288,7 @@ pgsql_upgrade() {
     fi
 
     # Check if there are any files in it
-    num_files=$(find ${scripts_dir}/pgsql/upgrade*.sh -type f | wc -l)
+    num_files=$(find "${scripts_dir}/pgsql" -name 'upgrade*.sh' -type f | wc -l)
     if [ "$num_files" -eq 0 ]; then
         log_error "No scripts in ${scripts_dir}/pgsql or the directory is not readable or does not have any upgrade* scripts."
         exit 1
@@ -326,7 +326,7 @@ cql_upgrade() {
     fi
 
     # Check if there are upgrade scripts.
-    find ${scripts_dir}/cql/upgrade*.sh -type f
+    find "${scripts_dir}/cql" -name 'upgrade*.sh' -type f
     retcode=$?
     if [ $retcode -eq 0 ]; then # Upgrade scripts are present.
         for script in ${scripts_dir}/cql/upgrade*.sh