From df1e23bef77af3dacf2e60c5861c5f88b4037445 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 23 Sep 2012 23:16:36 +0200 Subject: [PATCH] Slightly change the way plugin-related control files are handled. A plugins.enabled file is required for plugins to be enabled. The content of that file is concatened with optional plugin-*.enabled files in order to build the list of enabled plugins. Using shell globbing for that is utterly disgusting. I couldn't agree more. --- .../DNSCrypt/extra/usr/scripts/common.inc | 2 +- .../DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc index a3fdc49..d3c3772 100644 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/common.inc @@ -16,7 +16,7 @@ INSECURE_OPENDNS_FILE="${CONTROL_DIR}/insecure-opendns" FALLBACK_FILE="${CONTROL_DIR}/fallback" HANDLERS_LOCK_FILE="/var/run/dnscrypt-handlers.lock" DOMAINS_EXCEPTIONS_FILE="${CONTROL_DIR}/domains-exceptions" -DNSCRYPT_PROXY_PLUGINS_FILE="${CONTROL_DIR}/plugins" +DNSCRYPT_PROXY_PLUGINS_BASE_FILE="${CONTROL_DIR}/plugin" STATIC_RESOLVERS_FILE="${CONTROL_DIR}/static-resolvers" INTERFACE_UNBOUND="127.0.0.53" diff --git a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh index 3c5780c..abfba6b 100755 --- a/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh +++ b/DNSCrypt-Preference-Pane/DNSCrypt/extra/usr/scripts/start-dnscrypt-proxy.sh @@ -23,8 +23,8 @@ PID_DIR="${PROBES_BASE_DIR}/pids" || exit 1 mkdir -p -- "$PID_DIR" || exit 1 DNSCRYPT_PROXY_PLUGINS="" -[ -r "$DNSCRYPT_PROXY_PLUGINS_FILE" ] && - DNSCRYPT_PROXY_PLUGINS="$(cat "$DNSCRYPT_PROXY_PLUGINS_FILE")" +[ -r "${DNSCRYPT_PROXY_PLUGINS_BASE_FILE}s.enabled" ] && + DNSCRYPT_PROXY_PLUGINS="$(cat "$DNSCRYPT_PROXY_PLUGINS_BASE_FILE"[s-]*.enabled)" try_resolver() { local priority="$1"