summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Slater <nslater@apache.org>2008-06-15 17:00:58 +0000
committerNoah Slater <nslater@apache.org>2008-06-15 17:00:58 +0000
commit5d6be4a5424b7b4b860a955efe453b306817fe0d (patch)
tree0fed2e2cd285b6fe14816305c08fdbd7a042e339
parent081daf1250c079efc38a6be9c04984718d441a1f (diff)
more portability changes for OpenSolaris
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@667972 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--bin/couchdb.tpl.in26
-rw-r--r--bin/couchjs.tpl.in6
-rw-r--r--configure.ac6
3 files changed, 19 insertions, 19 deletions
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index eab2e52b..0e23d73c 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -37,7 +37,7 @@ STDERR_FILE=couchdb.stderr
HEART_COMMAND="%bindir%/%couchdb_command_name% -k"
HEART_BEAT_TIMEOUT=11
-basename=$(basename $0)
+basename=`basename $0`
display_version () {
# Display version and copyright information.
@@ -105,19 +105,19 @@ display_error () {
_load_configuration () {
# Load ini configuration and overwrite default variables.
- dbrootdir_ini_value=$(awk -F = "/^DbRootDir=/{print \$2}" < $INI_FILE)
+ dbrootdir_ini_value=`awk -F = "/^DbRootDir=/{print \$2}" < $INI_FILE`
if test -n "$dbrootdir_ini_value"; then
LIB_DIRECTORY=$dbrootdir_ini_value
fi
- logfile_ini_value=$(awk -F = "/^LogFile=/{print \$2}" < $INI_FILE)
+ logfile_ini_value=`awk -F = "/^LogFile=/{print \$2}" < $INI_FILE`
if test -n "$logfile_ini_value"; then
- LOG_DIRECTORY=$(dirname $logfile_ini_value)
+ LOG_DIRECTORY=`dirname $logfile_ini_value`
fi
}
_get_pid () {
if test -f $PID_FILE; then
- PID=$(cat $PID_FILE)
+ PID=`cat $PID_FILE`
fi
echo $PID
}
@@ -125,7 +125,7 @@ _get_pid () {
check_status () {
# Check the status of the running Apache CouchDB process.
- PID=$(_get_pid)
+ PID=`_get_pid`
if test -n "$PID"; then
if kill -0 $PID 2> /dev/null; then
echo "Apache CouchDB is running as process $PID. Time to relax."
@@ -154,14 +154,14 @@ check_environment () {
exit $SCRIPT_ERROR
fi
message_prefix="Apache CouchDB needs write permission on data file"
- for file in $(find $LIB_DIRECTORY -type f); do
+ for file in `find $LIB_DIRECTORY -type f`; do
if test ! -w $file; then
echo "$message_prefix: $file" >&2
exit $SCRIPT_ERROR
fi
done
message_prefix="Apache CouchDB needs write permission on log file"
- for file in $(find $LOG_DIRECTORY -type f); do
+ for file in `find $LOG_DIRECTORY -type f`; do
if test ! -w $file; then
echo "$message_prefix: $file" >&2
exit $SCRIPT_ERROR
@@ -239,9 +239,9 @@ start_couchdb () {
while true; do
export HEART_COMMAND
export HEART_BEAT_TIMEOUT
- $(eval $command -pidfile $PID_FILE -heart \
- > $STDOUT_FILE 2> $STDERR_FILE) || true
- PID=$(_get_pid)
+ `eval $command -pidfile $PID_FILE -heart \
+ > $STDOUT_FILE 2> $STDERR_FILE` || true
+ PID=`_get_pid`
if test -n "$PID"; then
if kill -0 $PID 2> /dev/null; then
# Found an existing process, do not respawn.
@@ -273,7 +273,7 @@ EOF
stop_couchdb () {
# Send SIGHUP to the running Apache CouchDB process.
- PID=$(_get_pid)
+ PID=`_get_pid`
if test -n "$PID"; then
# Clean up PID file or leave stale for respawn.
if test "$1" = "false"; then
@@ -305,7 +305,7 @@ stop_couchdb () {
parse_script_option_list () {
# Parse the script option list and take the appropriate action.
- if ! argument_list=$(getopt hVc:ibp:r:Ro:e:skd $@); then
+ if test ! argument_list=`getopt hVc:ibp:r:Ro:e:skd $@`; then
display_error
fi
eval set -- "$argument_list"
diff --git a/bin/couchjs.tpl.in b/bin/couchjs.tpl.in
index 0bc84f2f..af5399a2 100644
--- a/bin/couchjs.tpl.in
+++ b/bin/couchjs.tpl.in
@@ -19,7 +19,7 @@ SCRIPT_ERROR=1
DEFAULT_VERSION=170
-basename=$(basename $0)
+basename=`basename $0`
display_version () {
# Display version and copyright information.
@@ -79,7 +79,7 @@ run_couchjs () {
parse_script_option_list () {
# Parse the script option list and take the appropriate action.
- if ! argument_list=$(getopt hV $@); then
+ if test ! argument_list=`getopt hV $@`; then
display_error
fi
eval set -- "$argument_list"
@@ -91,7 +91,7 @@ parse_script_option_list () {
*) break;;
esac
done
- option_list=$(echo $@ | sed 's/--//')
+ option_list=`echo $@ | sed 's/--//'`
if test -z "$option_list"; then
display_error "You must specify a FILE."
fi
diff --git a/configure.ac b/configure.ac
index b65a2516..e6a6da9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,13 +106,13 @@ fi
erlang_version_error="The installed Erlang version is less than 5.5.0 (R11B)."
-version=$(${ERL} -version 2>&1 | ${SED} "s/[[^0-9]]/ /g")
+version=`${ERL} -version 2>&1 | ${SED} "s/[[^0-9]]/ /g"`
-if test $(echo $version | ${AWK} "{print \$1}") -lt 5; then
+if test `echo $version | ${AWK} "{print \$1}"` -lt 5; then
AC_MSG_ERROR([$erlang_version_error])
fi
-if test $(echo $version | ${AWK} "{print \$2}") -lt 5; then
+if test `echo $version | ${AWK} "{print \$2}"` -lt 5; then
AC_MSG_ERROR([$erlang_version_error])
fi