diff options
author | Matt Smith <mcs@darkregion.net> | 2011-04-05 07:05:02 -0500 |
---|---|---|
committer | Matt Smith <mcs@darkregion.net> | 2011-04-05 07:06:35 -0500 |
commit | 884ad269bd08686243e49698a3bbacf759d6c0b7 (patch) | |
tree | 4c6d908258611d4e89d8cf3bf48379c73bb7033b /testing/pdns-gui/0010-replace-bash-with-sh.patch | |
parent | 2bf9528b2e0f8350fbd20976efdce0bafb3e4b33 (diff) | |
download | aports-884ad269bd08686243e49698a3bbacf759d6c0b7.tar.bz2 aports-884ad269bd08686243e49698a3bbacf759d6c0b7.tar.xz |
testing/pdns-gui: new aport
Web-based GUI for administering PowerDNS
http://code.google.com/p/pdns-gui/
Diffstat (limited to 'testing/pdns-gui/0010-replace-bash-with-sh.patch')
-rw-r--r-- | testing/pdns-gui/0010-replace-bash-with-sh.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/testing/pdns-gui/0010-replace-bash-with-sh.patch b/testing/pdns-gui/0010-replace-bash-with-sh.patch new file mode 100644 index 000000000..e684009bf --- /dev/null +++ b/testing/pdns-gui/0010-replace-bash-with-sh.patch @@ -0,0 +1,81 @@ +--- ./batch/install.sh.orig ++++ ./batch/install.sh +@@ -1,10 +1,11 @@ +-#!/bin/bash ++#!/bin/sh + +-abspath=$(cd ${0%/*} && pwd -P) ++abspath=${0%/*} ++php=$(which php) + +-if [[ `which php` == "" ]]; then ++if [ -z "$php" ]; then + echo "Error: can't locate PHP CLI interpreter" + exit 1 + fi + +-php -q $abspath/install.php ++$php -q $abspath/install.php +--- ./batch/install.php.orig ++++ ./batch/install.php +@@ -110,7 +110,7 @@ + echo "\n\nAnd make sure 'mod_rewrite' is enabled.\n\n"; + /** + * Interactively prompts for input without echoing to the terminal. +- * Requires a bash shell or Windows and won't work with ++ * Requires a sh shell or Windows and won't work with + * safe_mode settings (Uses `shell_exec`) + */ + function prompt_silent($prompt = "Enter Password:") { +@@ -125,12 +125,12 @@ + unlink($vbscript); + return $password; + } else { +- $command = "/usr/bin/env bash -c 'echo OK'"; ++ $command = "/usr/bin/env sh -c 'echo OK'"; + if (rtrim(shell_exec($command)) !== 'OK') { +- trigger_error("Can't invoke bash"); ++ trigger_error("Can't invoke sh"); + return; + } +- $command = "/usr/bin/env bash -c 'read -s -p \"" ++ $command = "/usr/bin/env sh -c 'read -s -p \"" + . addslashes($prompt) + . "\" mypassword && echo \$mypassword'"; + $password = rtrim(shell_exec($command)); +--- ./batch/upgrade.sh.orig ++++ ./batch/upgrade.sh +@@ -1,10 +1,11 @@ +-#!/bin/bash ++#!/bin/sh + +-abspath=$(cd ${0%/*} && pwd -P) ++abspath=${0%/*} ++php=$(which php) + +-if [[ `which php` == "" ]]; then ++if [ -z "$php" ]; then + echo "Error: can't locate PHP CLI interpreter" + exit 1 + fi + +-php -q $abspath/upgrade.php ++$php -q $abspath/upgrade.php +--- ./batch/dev/refresh.sh.orig ++++ ./batch/dev/refresh.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + echo "" + echo "" +@@ -15,8 +15,7 @@ + echo -n " Do you want to continue [no]: " + read confirm + +-if [[ "$confirm" != "YES" ]] +-then ++if [ "$confirm" != "YES" ]; then + exit 0 + fi + |