couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nsla...@apache.org
Subject svn commit: r679821 - in /incubator/couchdb/trunk: CHANGES NEWS bin/couchdb.tpl.in
Date Fri, 25 Jul 2008 14:54:32 GMT
Author: nslater
Date: Fri Jul 25 07:54:32 2008
New Revision: 679821

URL: http://svn.apache.org/viewvc?rev=679821&view=rev
Log:
couchdb script no longer uses awk for configuration checks

Modified:
    incubator/couchdb/trunk/CHANGES
    incubator/couchdb/trunk/NEWS
    incubator/couchdb/trunk/bin/couchdb.tpl.in

Modified: incubator/couchdb/trunk/CHANGES
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/CHANGES?rev=679821&r1=679820&r2=679821&view=diff
==============================================================================
--- incubator/couchdb/trunk/CHANGES (original)
+++ incubator/couchdb/trunk/CHANGES Fri Jul 25 07:54:32 2008
@@ -1,6 +1,14 @@
 Apache CouchDB CHANGES
 ======================
 
+Version 0.8.1-incubating
+------------------------
+
+Packaging and System Integration:
+
+ * The `couchdb` script no longer uses `awk` for configuration checks as this
+   was causing portability problems.
+
 Version 0.8.0-incubating
 ------------------------
 

Modified: incubator/couchdb/trunk/NEWS
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/NEWS?rev=679821&r1=679820&r2=679821&view=diff
==============================================================================
--- incubator/couchdb/trunk/NEWS (original)
+++ incubator/couchdb/trunk/NEWS Fri Jul 25 07:54:32 2008
@@ -10,6 +10,11 @@
 
 This release is still under development.
 
+Version 0.8.1-incubating
+------------------------
+
+ * Minor fixes for the `couchdb` command.
+
 Version 0.8.0-incubating
 ------------------------
 

Modified: incubator/couchdb/trunk/bin/couchdb.tpl.in
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/bin/couchdb.tpl.in?rev=679821&r1=679820&r2=679821&view=diff
==============================================================================
--- incubator/couchdb/trunk/bin/couchdb.tpl.in (original)
+++ incubator/couchdb/trunk/bin/couchdb.tpl.in Fri Jul 25 07:54:32 2008
@@ -96,17 +96,6 @@
     exit $SCRIPT_ERROR
 }
 
-_load_configuration () {
-    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`
-    if test -n "$logfile_ini_value"; then
-        LOG_DIRECTORY=`dirname $logfile_ini_value`
-    fi
-}
-
 _get_pid () {
     if test -f $PID_FILE; then
         PID=`cat $PID_FILE`
@@ -132,59 +121,37 @@
 }
 
 check_environment () {
+    if test "$BACKGROUND_BOOLEAN" != "true"; then
+        return
+    fi
+    touch $PID_FILE 2> /dev/null || true
+    touch $STDOUT_FILE 2> /dev/null || true
+    touch $STDERR_FILE 2> /dev/null || true
     message_prefix="Apache CouchDB needs write permission on the"
-    if test ! -w $LIB_DIRECTORY; then
-        echo "$message_prefix data directory: $LIB_DIRECTORY" >&2
+    if test ! -w $PID_FILE; then
+        echo "$message_prefix PID file: $PID_FILE" >&2
         exit $SCRIPT_ERROR
     fi
-    if test ! -w $LOG_DIRECTORY; then
-        echo "$message_prefix log directory: $LOG_DIRECTORY" >&2
+    if test ! -w $STDOUT_FILE; then
+        echo "$message_prefix STDOUT file: $STDOUT_FILE" >&2
         exit $SCRIPT_ERROR
     fi
-    message_prefix="Apache CouchDB needs write permission on data file"
-    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
-        if test ! -w $file; then
-            echo "$message_prefix: $file" >&2
-            exit $SCRIPT_ERROR
-        fi
-    done
-    if test "$BACKGROUND_BOOLEAN" = "true"; then
-        touch $PID_FILE 2> /dev/null || true
-        touch $STDOUT_FILE 2> /dev/null || true
-        touch $STDERR_FILE 2> /dev/null || true
-        message_prefix="Apache CouchDB needs write permission on the"
-        if test ! -w $PID_FILE; then
-            echo "$message_prefix PID file: $PID_FILE" >&2
-            exit $SCRIPT_ERROR
-        fi
-        if test ! -w $STDOUT_FILE; then
-            echo "$message_prefix STDOUT file: $STDOUT_FILE" >&2
-            exit $SCRIPT_ERROR
-        fi
-        if test ! -w $STDERR_FILE; then
-            echo "$message_prefix STDERR file: $STDERR_FILE" >&2
-            exit $SCRIPT_ERROR
-        fi
-        message_prefix="Apache CouchDB needs a regular"
-        if ! echo 2> /dev/null >> $PID_FILE; then
-            echo "$message_prefix PID file: $PID_FILE" >&2
-            exit $SCRIPT_ERROR
-        fi
-        if ! echo 2> /dev/null >> $STDOUT_FILE; then
-            echo "$message_prefix STDOUT file: $STDOUT_FILE" >&2
-            exit $SCRIPT_ERROR
-        fi
-        if ! echo 2> /dev/null >> $STDERR_FILE; then
-            echo "$message_prefix STDERR file: $STDERR_FILE" >&2
-            exit $SCRIPT_ERROR
-        fi
+    if test ! -w $STDERR_FILE; then
+        echo "$message_prefix STDERR file: $STDERR_FILE" >&2
+        exit $SCRIPT_ERROR
+    fi
+    message_prefix="Apache CouchDB needs a regular"
+    if ! echo 2> /dev/null >> $PID_FILE; then
+        echo "$message_prefix PID file: $PID_FILE" >&2
+        exit $SCRIPT_ERROR
+    fi
+    if ! echo 2> /dev/null >> $STDOUT_FILE; then
+        echo "$message_prefix STDOUT file: $STDOUT_FILE" >&2
+        exit $SCRIPT_ERROR
+    fi
+    if ! echo 2> /dev/null >> $STDERR_FILE; then
+        echo "$message_prefix STDERR file: $STDERR_FILE" >&2
+        exit $SCRIPT_ERROR
     fi
 }
 
@@ -307,7 +274,6 @@
             *) display_error "Unknown option: $1" >&2;;
         esac
     done
-    _load_configuration
     if test "$KILL_BOOLEAN" = "true" -o "$SHUTDOWN_BOOLEAN" = "true"; then
         stop_couchdb $KILL_BOOLEAN
     else



Mime
View raw message