repl_entry.c 782 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /** BEGIN COPYRIGHT BLOCK
  2. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  3. * Copyright (C) 2005 Red Hat, Inc.
  4. * All rights reserved.
  5. * END COPYRIGHT BLOCK **/
  6. #include "slapi-plugin.h"
  7. #include "repl.h"
  8. static int dumping_to_ldif= 0;
  9. static int doing_replica_init= 0;
  10. static char **include_suffix= NULL;
  11. /*
  12. * This is passed the slapd command line arguments.
  13. */
  14. void
  15. repl_entry_init(int argc, char** argv)
  16. {
  17. int i;
  18. for(i=1;i<argc;i++)
  19. {
  20. if(strcmp(argv[i],"db2ldif")==0)
  21. {
  22. dumping_to_ldif= 1;
  23. }
  24. if(strcmp(argv[i],"-r")==0)
  25. {
  26. doing_replica_init= 1;
  27. }
  28. if(strcmp(argv[i],"-s")==0)
  29. {
  30. char *s= slapi_dn_normalize ( slapi_ch_strdup(argv[i+1]) );
  31. charray_add(&include_suffix,s);
  32. i++;
  33. }
  34. }
  35. }