Syntax error in zmdc.pl

Forum for questions and support relating to the 1.24.x releases only.
Locked
majost
Posts: 14
Joined: Sun Oct 12, 2008 9:36 pm

Syntax error in zmdc.pl

Post by majost »

Code: Select all

$ sudo /usr/bin/zmdc.pl
syntax error at /usr/bin/zmdc.pl line 564, near ") )
					"
syntax error at /usr/bin/zmdc.pl line 567, near "} ="
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 567.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 568.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 568.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 569.
syntax error at /usr/bin/zmdc.pl line 571, near "else"
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 573.
syntax error at /usr/bin/zmdc.pl line 573, near "} ="
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 573.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 574.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 574.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 574.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 575.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 577.
Global symbol "$process" requires explicit package name at /usr/bin/zmdc.pl line 579.
syntax error at /usr/bin/zmdc.pl line 581, near "}"
/usr/bin/zmdc.pl has too many errors.
Patch:

Code: Select all

--- zmdc.pl	2008-10-12 16:53:33.000000000 -0700
+++ zmdc.pl	2008-10-12 16:53:53.000000000 -0700
@@ -560,7 +560,7 @@
 
 				if ( $process->{keepalive} )
 				{
-					if ( !$process->{delay} || ($process->{runtime} > ZM_MAX_RESTART_DELAY)) )
+					if ( !$process->{delay} || ($process->{runtime} > ZM_MAX_RESTART_DELAY))
 					{
 						#start( $process->{daemon}, @{$process->{args}} );
 						# Schedule for immediate restart
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks. I managed to bugger that one up.
Phil
wlraider70
Posts: 2
Joined: Mon May 02, 2011 7:47 am

Re: Syntax error in zmdc.pl

Post by wlraider70 »

This looks like it is pertinent to my error can someone clarify what to do.

$ sudo /etc/init.d/zoneminder start
Starting ZoneMinder: syntax error at /usr/bin/zmdc.pl line 65, near "my "
Global symbol "@daemons" requires explicit package name at /usr/bin/zmdc.pl line 65.
Global symbol "@daemons" requires explicit package name at /usr/bin/zmdc.pl line 105.
Global symbol "@daemons" requires explicit package name at /usr/bin/zmdc.pl line 752.
Global symbol "@daemons" requires explicit package name at /usr/bin/zmdc.pl line 759.
Execution of /usr/bin/zmdc.pl aborted due to compilation errors.
failure
baraboom
Posts: 3
Joined: Wed Mar 09, 2011 2:04 pm

Re: Syntax error in zmdc.pl

Post by baraboom »

You need to find the line that matches the line beginning with the - and make it match the line that begins with the +:
- if ( !$process->{delay} || ($process->{runtime} > ZM_MAX_RESTART_DELAY)) )
+ if ( !$process->{delay} || ($process->{runtime} > ZM_MAX_RESTART_DELAY))
Looks like you're removing the extra ")" at the end of line 560 in zmdc.pl.

HTH,
boom
Locked