diff options
author | Adam Warner <PromoFaux@users.noreply.github.com> | 2017-01-09 02:22:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09 02:22:26 +0300 |
commit | 47196d86adbdead18faf3a0c17d3ccc5b457da6d (patch) | |
tree | 8f09ef6711384baf9fe55d62667d0d7cca3adb84 | |
parent | a2bc86fbcbc96698b1d3f4dd3cf21a81575ccd82 (diff) | |
parent | a713cf7952b70b411cb99e97ee1a0443b9716625 (diff) |
Merge pull request #1115 from pi-hole/developmentv2.11.2
[RELEASE] Pi-hole Core 2.11.2
-rwxr-xr-x | advanced/Scripts/update.sh | 29 | ||||
-rwxr-xr-x | advanced/Scripts/webpage.sh | 2 | ||||
-rwxr-xr-x | automated install/basic-install.sh | 4 |
3 files changed, 30 insertions, 5 deletions
diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index a2a5e8dc..df71e9a9 100755 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -91,12 +91,37 @@ GitCheckUpdateAvail() { # Fetch latest changes in this repo 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 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 return 0 else diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 18ed982f..acf8eca9 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -136,7 +136,7 @@ SetDNSServers(){ change_setting "DNS_BOGUS_PRIV" "false" fi - ProcessDnsmasqSettings + ProcessDNSSettings # Restart dnsmasq to load new configuration RestartDNS diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index e5142915..0307bd2e 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -235,8 +235,8 @@ chooseInterface() { # Loop sentinel variable local firstLoop=1 - if [[ $(echo ${availableInterfaces} | wc -l) -eq 1 ]]; then - PIHOLE_INTERFACE=${availableInterfaces} + if [[ $(echo "${availableInterfaces}" | wc -l) -eq 1 ]]; then + PIHOLE_INTERFACE="${availableInterfaces}" return fi |