orientdb.sh fails on mac OSX due to “su -c”; newbie


*OrientDB release? (If you're using a SNAPSHOT please attach also the 
build number found in "build.number" file):*

orient-community-1.7-rc1


*my machine:*

imac running osx 10.9.1


*What steps will reproduce the problem?*

1. install and unzip orientdb

2. change user setting in config

added the following line to orientdb-server-config.xml

<*user* resources="*" password="password" name="user"/>

3. chmod 777 ./bin/ *.sh

4. ./orientdb.sh start


*What is the expected output? *

orientdb startup sequence


*What do you see instead?*

Starting OrientDB server daemon...

su: illegal option -- c

usage: su [-] [-flm] [login [args]]


*This seems to be the line in the script that fails ...*

su -c "cd \"$ORIENTDB_DIR/bin\"; /usr/bin/nohup ./server.sh 
1>../log/orientdb.log 2>../log/orientdb.err &" - $ORIENTDB_USER



Below is some excerpts from the man page for “su” on Mac osx.  It does seem 
to me that the os does not allow “su -c”.  It looks to me like the “-c” has 
to come AFTER a valid username (that you are logging in as).



SU(1)                     BSD General Commands Manual                    
SU(1)


NAME

     su -- substitute user identity


SYNOPSIS

     su [-] [-flm] [login [args]]


DESCRIPTION


     If the optional args are provided on the command line, they are passed 
to the login shell of the target login.  Note that all

     command line arguments before the target login name are processed by 
su itself, everything after the target login name gets

     passed to the login shell.


EXAMPLES

     su man -c catman

            Runs the command catman as user man.  You will be asked for 
man's password unless your real UID is 0.

     su man -c 'catman /usr/share/man /usr/local/man'

            Same as above, but the target command consists of more than a 
single word and hence is quoted for use with the -c

            option being passed to the shell.  (Most shells expect the 
argument to -c to be a single word).


BSD                           September 13, 2006                           
BSD



====================================

My Questions

1. How can I fix this problem, or work around it?


2. Is this same problem likely to show up in other scripts that are 
provided with the install? Where else am I going to need to fix this?


3. How can this problem exist after so many years and so many users? I must 
be doing something wrong.  I know that others are using osx.  


Thanks for any help,

Don

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to