Merge pull request #1115 from pi-hole/development

[RELEASE] Pi-hole Core 2.11.2
This commit is contained in:
Adam Warner 2017-01-08 23:22:26 +00:00 committed by GitHub
commit 47196d86ad
3 changed files with 30 additions and 5 deletions

View file

@ -91,12 +91,37 @@ GitCheckUpdateAvail() {
# Fetch latest changes in this repo # Fetch latest changes in this repo
git fetch --quiet origin git fetch --quiet origin
status="$(git status -sb)"
# @ alone is a shortcut for HEAD. Older versions of git
# need @{0}
LOCAL="$(git rev-parse @{0})"
# The suffix @{upstream} to a branchname
# (short form <branchname>@{u}) refers
# to the branch that the branch specified
# by branchname is set to build on top of#
# (configured with branch.<name>.remote and
# branch.<name>.merge). A missing branchname
# defaults to the current one.
REMOTE="$(git rev-parse @{upstream})"
# Change back to original directory # Change back to original directory
cd "${curdir}" cd "${curdir}"
if [[ $status == *"behind"* ]]; then if [[ ${#LOCAL} == 0 ]]; then
echo "::: Error: Local revision could not be optained, ask Pi-hole support."
echo "::: Additional debugging output:"
git status
exit
fi
if [[ ${#REMOTE} == 0 ]]; then
echo "::: Error: Remote revision could not be optained, ask Pi-hole support."
echo "::: Additional debugging output:"
git status
exit
fi
if [[ "${LOCAL}" != "${REMOTE}" ]]; then
# Local branch is behind remote branch -> Update # Local branch is behind remote branch -> Update
return 0 return 0
else else

View file

@ -136,7 +136,7 @@ SetDNSServers(){
change_setting "DNS_BOGUS_PRIV" "false" change_setting "DNS_BOGUS_PRIV" "false"
fi fi
ProcessDnsmasqSettings ProcessDNSSettings
# Restart dnsmasq to load new configuration # Restart dnsmasq to load new configuration
RestartDNS RestartDNS

View file

@ -235,8 +235,8 @@ chooseInterface() {
# Loop sentinel variable # Loop sentinel variable
local firstLoop=1 local firstLoop=1
if [[ $(echo ${availableInterfaces} | wc -l) -eq 1 ]]; then if [[ $(echo "${availableInterfaces}" | wc -l) -eq 1 ]]; then
PIHOLE_INTERFACE=${availableInterfaces} PIHOLE_INTERFACE="${availableInterfaces}"
return return
fi fi