Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-4409

moxi-server init script broken on Ubuntu

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0-developer-preview-4
    • 1.7.1.1
    • None
    • Security Level: Public
    • None
    • Ubuntu 10.04 and 8.04

    Description

      The moxi init script (/opt/moxi/etc/moxi-init.d) fails on Ubuntu with this error:

      $ sudo /etc/init.d/moxi-server start
      /bin/su: invalid option – d
      Usage: su [options] [LOGIN]

      Options:
      -c, --command COMMAND pass COMMAND to the invoked shell
      -h, --help display this help message and exit
      -, -l, --login make the shell a login shell
      -m, -p,
      --preserve-environment do not reset environment variables, and keep
      the same shell
      -s, --shell SHELL use SHELL instead of the default in passwd

      • Failed to start moxi server

      A little debugging shows the failed command line is this one (line 42):

      start_daemon /bin/su -c "$DAEMON -d -P $PIDFILE -Z $MOXI_CFG -z $MOXI_CLUSTER_CFG" moxi

      The quoting is stripped before the command is passed to "su", so su tries to parse the moxi arguments.

      The "su" call appears to be superfluous anyway, as moxi has a "-u" flag to specify the user. The following version behaves as expected:

      start_daemon $DAEMON -d -P $PIDFILE -Z $MOXI_CFG -z $MOXI_CLUSTER_CFG -u moxi

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            steve Steve Yen
            insyte Ben Beuchler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty