mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-10 09:56:40 -04:00
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.