Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress debug messages on ZM service start/restart #1847

Merged
merged 1 commit into from
Apr 7, 2017
Merged

Suppress debug messages on ZM service start/restart #1847

merged 1 commit into from
Apr 7, 2017

Commits on Apr 6, 2017

  1. Suppress debug messages on ZM service start/restart

    The tests in the script General.pm that determine the format for superuser calls on the target environment may leak debug messages to STDOUT. This can be replicated on a Docker installation of Zoneminder lacking sudo. Starting the Zoneminder process  will display an intimidating series of error messages that can safely be ignored by the user:
    
    e.g.
    '''
    root@2bfdd23cc27a:~# service zoneminder start
    
    Starting ZoneMinder: Can't exec "sudo": No such file or directory at /usr/share/perl5/ZoneMinder/General.pm line 1                                                   10.
    Use of uninitialized value $output in scalar chomp at /usr/share/perl5/ZoneMinder/General.pm line 119.
    Use of uninitialized value $output in concatenation (.) or string at /usr/share/perl5/ZoneMinder/General.pm line 1                                                   20.
    success
    '''
    
    This patch redirects STDERR from the qx(...) calls to the debug message., And if the output of qx(...) is undefined, replaces it with any error in $! resulting from the qx(...) call.
    ekwoodrich committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    c4ec2d7 View commit details
    Browse the repository at this point in the history