-/*
- * Configuration file parser for new and old Include and
- * Exclude records
- *
- * Kern Sibbald, March MMIII
- *
- * Version $Id$
- */
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+ 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.
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ * Configuration file parser for new and old Include and
+ * Exclude records
+ *
+ * Kern Sibbald, March MMIII
+ *
+ * Version $Id$
+ */
#include "bacula.h"
#include "dird.h"
{"noatime", store_opts, {0}, 0, 0, 0},
{"enhancedwild", store_opts, {0}, 0, 0, 0},
{"drivetype", store_drivetype, {0}, 0, 0, 0},
+ {"checkfilechanges",store_opts, {0}, 0, 0, 0},
+ {"strippath", store_opts, {0}, 0, 0, 0},
{NULL, NULL, {0}, 0, 0, 0}
};
INC_KW_IGNORECASE,
INC_KW_HFSPLUS,
INC_KW_NOATIME,
- INC_KW_ENHANCEDWILD
+ INC_KW_ENHANCEDWILD,
+ INC_KW_CHKCHANGES,
+ INC_KW_STRIPPATH
};
/*
{"hfsplussupport", INC_KW_HFSPLUS},
{"noatime", INC_KW_NOATIME},
{"enhancedwild", INC_KW_ENHANCEDWILD},
+ {"checkfilechanges", INC_KW_CHKCHANGES},
+ {"strippath", INC_KW_STRIPPATH},
{NULL, 0}
};
{"no", INC_KW_NOATIME, "0"},
{"yes", INC_KW_ENHANCEDWILD, "K"},
{"no", INC_KW_ENHANCEDWILD, "0"},
+ {"yes", INC_KW_CHKCHANGES, "c"},
+ {"no", INC_KW_CHKCHANGES, "0"},
{NULL, 0, 0}
};
bstrncat(opts, lc->str, optlen);
bstrncat(opts, ":", optlen); /* terminate it */
Dmsg3(900, "Catopts=%s option=%s optlen=%d\n", opts, option,optlen);
-
+ } else if (keyword == INC_KW_STRIPPATH) { /* another special case */
+ if (!is_an_integer(lc->str)) {
+ scan_err1(lc, _("Expected a strip path positive integer, got:%s:"), lc->str);
+ }
+ bstrncat(opts, "P", optlen); /* indicate strip path */
+ bstrncat(opts, lc->str, optlen);
+ bstrncat(opts, ":", optlen); /* terminate it */
+ Dmsg3(900, "Catopts=%s option=%s optlen=%d\n", opts, option,optlen);
/*
* Standard keyword options for Include/Exclude
*/