diff --git a/patches/utils/patch_header.sh b/patches/utils/patch_header.sh
index 7ef8a94b4647fe93a423b62ce25c978f94fd346d..1ce49720bb6a781f4601d4f8cf10488d38c310a8 100644
--- a/patches/utils/patch_header.sh
+++ b/patches/utils/patch_header.sh
@@ -21,7 +21,12 @@
 # ** end header
 #
 #header for patch scripts
-source .config
+if test -e ../.config ; then
+    source ../.config
+fi
+if test -e .config ; then
+    source .config
+fi
 USAGE="$1 --database=DATABASE_NAME [ --login-path=LOGIN_PATH | --user=USER [ --password=PASSWORD ] ]\n\n"
 CMD_OPTIONS="options:\n\n-h, --help\n\tShow brief help.\n-l LOGIN_PATH, --login-path=LOGIN_PATH\n\tA login-path for the mysql connection (see 'man mysql' and 'man mysql-config-editor').\n-u USER, --user=USER\n\tA mysql user.\n-p PASSWORD, --password=PASSWORD\n\tThe password for the mysql user.\n"
 set -e