Projects
home:dercol:branches:openSUSE.org:home:Monex:stable
ZoneMinder
reload_patch.20200211.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reload_patch.20200211.patch of Package ZoneMinder
diff -Nur zoneminder-1.34.2.qorig/scripts/zmpkg.pl.in zoneminder-1.34.2/scripts/zmpkg.pl.in --- zoneminder-1.34.2.qorig/scripts/zmpkg.pl.in 2020-02-11 11:16:01.896009112 +0100 +++ zoneminder-1.34.2/scripts/zmpkg.pl.in 2020-02-11 15:16:39.554416967 +0100 @@ -168,6 +168,9 @@ Debug("zmdc.pl check = $status"); if ( $status eq 'stopped' ) { + + ZoneMinder::Config::load_configuration(); + if ( $Config{ZM_DYN_DB_VERSION} and ( $Config{ZM_DYN_DB_VERSION} ne ZM_VERSION ) ) { diff -Nur zoneminder-1.34.2.qorig/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in zoneminder-1.34.2/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in --- zoneminder-1.34.2.qorig/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in 2020-02-11 15:16:17.934416462 +0100 +++ zoneminder-1.34.2/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in 2020-02-11 15:16:39.554416967 +0100 @@ -72,7 +72,8 @@ require ZoneMinder::Database; # Load the config from the database into the symbol table -BEGIN { +sub load_configuration +{ require ZoneMinder::Database; # Process name, value pairs from the main config file first @@ -144,7 +145,7 @@ close($CONFIG); } # end sub process_configfile -} # end BEGIN +} # end load_configuration sub loadConfigFromDB { print( 'Loading config from DB' ); @@ -248,6 +249,10 @@ $dbh->{AutoCommit} = $ac; } # end sub saveConfigToDB +BEGIN +{ + load_configuration(); +} # end BEGIN 1; __END__ diff -Nur zoneminder-1.34.2.qorig/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.orig zoneminder-1.34.2/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.orig --- zoneminder-1.34.2.qorig/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.orig 2020-02-11 11:16:01.884009112 +0100 +++ zoneminder-1.34.2/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.orig 2020-02-11 15:16:17.934416462 +0100 @@ -184,6 +184,8 @@ sub saveConfigToDB { print( 'Saving config to DB ' . @options . " entries\n" ); + local $SIG{INT} = 'IGNORE'; + local $SIG{TERM} = 'IGNORE'; my $dbh = ZoneMinder::Database::zmDbConnect(); if ( !$dbh ) { print( "Error: unable to save options to database: $DBI::errstr\n" ); diff -Nur zoneminder-1.34.2.qorig/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.rej zoneminder-1.34.2/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.rej --- zoneminder-1.34.2.qorig/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.rej 2020-02-11 13:45:33.206289223 +0100 +++ zoneminder-1.34.2/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in.rej 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ ---- scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in 2020-02-11 13:27:41.849245307 +0100 -+++ scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in 2020-02-11 13:26:32.002337668 +0100 -@@ -185,6 +186,8 @@ - - sub saveConfigToDB { - print( 'Saving config to DB ' . @options . " entries\n" ); -+ local $SIG{INT} = 'IGNORE'; -+ local $SIG{TERM} = 'IGNORE'; - my $dbh = ZoneMinder::Database::zmDbConnect(); - if ( !$dbh ) { - print( "Error: unable to save options to database: $DBI::errstr\n" );
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.