Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix state file truncation when running bareos-dir -t
When bareos-dir -t is run (which is done from the systemd startup) we never read the state-file nor create a pid-file but in the terminate_dird() function we unconditionally write a new state-file which means we clobber its content. We now keep track of the test_config flag using a static global variable and don't try updating the state-file nor removing the pid-file in terminate_dird() when we are in test_config mode. Also made the terminate_dird() and terminate_stored() static as they are not referenced from anywhere else anyway so lets not clobber the namespace with it. Fixes #499: Director state file gets truncated
- Loading branch information
Marco van Wieringen
committed
Aug 14, 2015
1 parent
b7ea430
commit 6dd8b29
Showing
2 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters