Page 1 of 1

zm-1.21.3 not starting after upgrade from 1.20.1

Posted: Tue Jul 19, 2005 9:40 pm
by maclellan
I get this error message in zmpkg.log:

Command: start
Executing su apache --shell=/bin/sh --command='/usr/local/bin/zmdc.pl check'
/bin/sh: --shell=/bin/sh invalid option
Usage: /bin/sh [GNU long option] [option] script -file ...
GNU long options:
--debug
--dump -po strings
--dump -strings
--help
--init file
--login
--noediting
--noprofile
--norc
--posic
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-i rsD or -c command or -O shopt-option (invocation only)
-abefhkmnptuvxBCHP or -o option




Any ideas?

Posted: Thu Jul 21, 2005 6:57 am
by maclellan
An update. I copied the old zmpkg.pl file from 1.20.1 and it works! I'm not sure if mixing versions and files is a good idea but this works for now.

Posted: Thu Jul 21, 2005 7:20 am
by cordel
What Distro are you using?
What version of make file, gcc, etc...?
Anything else you might be able to think of to give Phil a better picture?
Regards,
Cordel

Posted: Thu Jul 21, 2005 11:45 am
by zoneminder
Was this Slackware by any chance?

Phil

Posted: Thu Jul 21, 2005 7:08 pm
by maclellan
I'm using Gentoo - 2004.3 with all the standard stuff to run Zoneminder.

Posted: Fri Jul 22, 2005 10:25 am
by zoneminder
Try editing zmpkg.pl (or zmpkg.pl.z and then rerun zmconfig.pl, rebuild and reinstall) and changing

Code: Select all

$command = "su ".ZM_WEB_USER." --shell=/bin/sh --command='$command'";
to

Code: Select all

$command = "su ".ZM_WEB_USER." –c ’$command’";
This is something that has to be modded in Slackware, it may be the case in Gentoo also. I'd add support for both formats but I'm not sure how to detect which version to use.

Phil

Posted: Tue Jul 26, 2005 9:21 pm
by Ruler
I read the initial post and was going to suggest modifying the --command line. From the sound of it, especially with --command not listed in the error as a viable long option and the old source file fixing the problem, I'd bet that this is the cause.

Maybe somebody with a different distro can try this out, but does the -c (short form) work on non-slack distros? If it doesn't, possible make it a config option and wrap the execution inside an if. 1.21.0 compiled fine on slack; this will just produce errors when trying to use specific functions.

Posted: Wed Jul 27, 2005 12:12 pm
by lazyleopard
Yes, gentoo has the old-style su syntax...