X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fdird%2Ffd_cmds.c;h=785d6794b8e1c16fd108aa06b01ae8cb15bbe219;hb=b8224aab234012c2d127b84eceb160e99dd4a14d;hp=31a9775e7f835994912c03f85c076bb98c912902;hpb=7aa8edb1de31c4dc44122397248ea1faa9bb002b;p=bacula%2Fbacula diff --git a/bacula/src/dird/fd_cmds.c b/bacula/src/dird/fd_cmds.c index 31a9775e7f..785d6794b8 100644 --- a/bacula/src/dird/fd_cmds.c +++ b/bacula/src/dird/fd_cmds.c @@ -1,3 +1,30 @@ +/* + Bacula® - The Network Backup Solution + + Copyright (C) 2000-2007 Free Software Foundation Europe e.V. + + The main author of Bacula is Kern Sibbald, with contributions from + many others, a complete list can be found in the file AUTHORS. + This program is Free Software; you can redistribute it and/or + modify it under the terms of version two of the GNU General Public + License as published by the Free Software Foundation plus additions + that are listed in the file LICENSE. + + 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., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + + Bacula® is a registered trademark of John Walker. + The licensor of Bacula is the Free Software Foundation Europe + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, + Switzerland, email:ftf@fsfeurope.org. +*/ /* * * Bacula Director -- fd_cmds.c -- send commands to File daemon @@ -12,20 +39,6 @@ * * Version $Id$ */ -/* - Copyright (C) 2000-2006 Kern Sibbald - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as amended 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 - the file LICENSE for additional details. - - */ #include "bacula.h" #include "dird.h" @@ -492,6 +505,9 @@ int send_runscript_with_old_proto(JCR *jcr, int when, POOLMEM *msg) /* * Send RunScripts to File daemon + * 1) We send all runscript to FD, they can be executed Before, After, or twice + * 2) Then, we send a "RunBeforeNow" command to the FD to tell him to do the + * first run_script() call. (ie ClientRunBeforeJob) */ int send_runscripts_commands(JCR *jcr) { @@ -539,15 +555,16 @@ int send_runscripts_commands(JCR *jcr) return 0; } } - /* + /* TODO : we have to play with other client */ + /* else { send command to an other client } */ } - } - - /* TODO : we have to play with other client */ + } + + /* We tell to the FD that i can execute commands (ie ClientRunBeforeJob) */ if (launch_before_cmd) { bnet_fsend(fd, runbeforenow); if (!response(jcr, fd, OKRunBeforeNow, "RunBeforeNow", DISPLAY_ERROR)) {