Use explicit paths

This commit is contained in:
Frank Denis
2012-07-30 12:39:12 -07:00
parent 42444b5652
commit 8611fc0df5
12 changed files with 17 additions and 10 deletions
+2
View File
@@ -1,5 +1,7 @@
#! /bin/sh
. ./common.inc
try_resolution() {
exec alarmer 5 dig +tries=2 +time=3 +short resolver1.opendns.com \
| egrep '^208[.]67[.]' > /dev/null 2>&1
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
. common.inc
. ./common.inc
try_local_resolution() {
exec dig +tries=2 +time=3 +short resolver1.opendns.com @$INTERFACE_PROXY \
+1 -1
View File
@@ -1,7 +1,7 @@
#! /bin/ksh
# /Library/Preferences/SystemConfiguration
. common.inc
. ./common.inc
NETWORK_STATE_FILE="${STATES_DIR}/network-state"
DHCP_DNS_FILE="${STATES_DIR}/dhcp-dns"
+3 -1
View File
@@ -1,6 +1,8 @@
DNSCRYPT_BASE_DIR='/Library/Application Support/DNSCrypt'
cd -- "${DNSCRYPT_BASE_DIR}/scripts" || exit 1
CONTROL_DIR="${DNSCRYPT_BASE_DIR}/control"
DNSCRYPT_PROXY_BASE_DIR="${DNSCRYPT_BASE_DIR}/dnscrypt-proxy"
PROXY_PID_FILE="${DNSCRYPT_PROXY_BASE_DIR}/dnscrypt-proxy.pid"
@@ -15,7 +17,7 @@ INTERFACE_PROXY_MASK="24"
INTERFACE_PROBES="127.0.0.55"
INTERFACE_PROBES_MASK="24"
export PATH="${DNSCRYPT_BASE_DIR/bin}:${DNSCRYPT_BASE_DIR/scripts}:$PATH"
export PATH="${DNSCRYPT_BASE_DIR}/bin:${DNSCRYPT_BASE_DIR}/scripts:$PATH"
init_interfaces() {
sudo ifconfig lo0 alias ${INTERFACE_UNBOUND}/${INTERFACE_UNBOUND_MASK}
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
. common.inc
. ./common.inc
if [ -e "$DNSCRYPT_FILE" ]; then
exec ./switch-to-dnscrypt.sh
+1 -2
View File
@@ -1,13 +1,12 @@
#! /bin/sh
. common.inc
. ./common.inc
FALLBACK_FILE="${CONTROL_DIR}/fallback"
[ ! -e "$FALLBACK_FILE" ] && exit 0
./check-network-change.sh || exit 0
./check-hijacking.sh && exit 0
[ ! -e "$DNSCRYPT_FILE" ] && exit 0
./set-dns-to-dhcp.sh
./switch-to-dnscrypt.sh
+2
View File
@@ -1,5 +1,7 @@
#! /bin/sh
. ./common.inc
exec networksetup -listallnetworkservices 2>/dev/null | \
fgrep -v '*' | while read x ; do
networksetup -setdnsservers "$x" empty
+2
View File
@@ -1,5 +1,7 @@
#! /bin/sh
. ./common.inc
servers="$*"
[ $# -lt 1 ] && exit 1
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
. common.inc
. ./common.inc
FAMILYSHIELD_FILE="${CONTROL_DIR}/familyshield"
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
. common.inc
. ./common.inc
pgrep -x dnscrypt-proxy | egrep '[0-9]+' > /dev/null || exit 0
[ ! -r "$PROXY_PID_FILE" ] && exit 0
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/sh
. common.inc
. ./common.inc
[ -e "$DNSCRYPT_FILE" ] && exit 0
+1 -1
View File
@@ -1,6 +1,6 @@
#! /bin/ksh
. common.inc
. ./common.inc
PAUSE_MAX=10
PAUSE_INCREMENT=0.1