Details
-
Bug
-
Resolution: Fixed
-
Major
-
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