*
* Version $Id$
*/
-
/*
Copyright (C) 2000-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as ammended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
+
#include "bacula.h"
#include "dird.h"
#include "findlib/find.h"
free_bsr(bsr);
return false;
}
- free_ua_context(ua);
- free_bsr(bsr);
if (jcr->RestoreBootstrap) {
free(jcr->RestoreBootstrap);
}
POOLMEM *fname = get_pool_memory(PM_MESSAGE);
- Mmsg(fname, "%s/restore.bsr", working_directory);
+ make_unique_restore_filename(ua, &fname);
jcr->RestoreBootstrap = bstrdup(fname);
+ free_ua_context(ua);
+ free_bsr(bsr);
free_pool_memory(fname);
jcr->needs_sd = true;
}
stat = wait_for_job_termination(jcr);
- verify_cleanup(jcr, stat);
- return true;
+ if (stat == JS_Terminated) {
+ verify_cleanup(jcr, stat);
+ return true;
+ }
+ return false;
}
set_jcr_job_status(jcr, TermCode);
update_job_end_record(jcr);
+ if (jcr->unlink_bsr && jcr->RestoreBootstrap) {
+ unlink(jcr->RestoreBootstrap);
+ jcr->unlink_bsr = false;
+ }
msg_type = M_INFO; /* by default INFO message */
switch (TermCode) {