rnewson commented on issue #4001:
URL: https://github.com/apache/couchdb/issues/4001#issuecomment-1104403418

   I think this is the fix;
   
   ```
   diff --git a/debian/couchdb.config b/debian/couchdb.config
   index df9518c..e21d9e7 100755
   --- a/debian/couchdb.config
   +++ b/debian/couchdb.config
   @@ -84,7 +84,9 @@ promptcookie() {
    if [ -e /opt/couchdb/etc/vm.args ] ; then
      cookie="$(grep '^-setcookie' /opt/couchdb/etc/vm.args | cut -d ' ' -f 2 | 
stripwhitespace)"
      nodename="$(grep '^-name' /opt/couchdb/etc/vm.args | cut -d ' ' -f 2 | 
stripwhitespace)"
   -  db_set couchdb/cookie "${cookie}"
   +  if [ -n "$cookie" ]; then
   +      db_set couchdb/cookie "${cookie}"
   +  fi
      if [ "${nodename}" != "[email protected]" ]; then
        db_set couchdb/nodename "${nodename}"
      fi
   ```
   
   What's happening is the couchdb.config forcibly sets couchdb/cookie to the 
empty string (because it's now empty in the original vm.args file), so even if 
you set it with debconf, it won't help. 
   
   My change above guards against setting the debconf variable if there is no 
existing value.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to