zm-1.21.3 not starting after upgrade from 1.20.1

Support and queries relating to all previous versions of ZoneMinder
Locked
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

zm-1.21.3 not starting after upgrade from 1.20.1

Post 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?
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Post 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.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Was this Slackware by any chance?

Phil
maclellan
Posts: 44
Joined: Fri Feb 25, 2005 10:57 pm

Post by maclellan »

I'm using Gentoo - 2004.3 with all the standard stuff to run Zoneminder.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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
Ruler
Posts: 235
Joined: Mon Nov 08, 2004 9:02 pm
Location: Bay City, MI

Post 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.
User avatar
lazyleopard
Posts: 403
Joined: Tue Mar 02, 2004 6:12 pm
Location: Gloucestershire, UK

Post by lazyleopard »

Yes, gentoo has the old-style su syntax...
Rick Hewett
Locked