-/*
- * The Data Control Manager for MOIRA.
+/* $Id$
*
- * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
- * For copying and distribution information, see the file
- * "mit-copyright.h".
+ * The Data Control Manager for Moira.
*
- * $Source$
- * $Author$
- * $Header$
+ * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology.
+ * For copying and distribution information, see the file
+ * <mit-copyright.h>.
*/
-#ifndef lint
-static char rcsid_dcm_c[] = "$Header$";
-#endif lint
+#include <mit-copyright.h>
+#include <moira.h>
+#include <moira_site.h>
+#include "update.h"
+
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
#include <signal.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
-#include <sys/param.h>
-#include <sys/wait.h>
-#include <com_err.h>
#include <gdb.h>
-#include <moira.h>
-#include <moira_site.h>
EXEC SQL INCLUDE sqlca;
+void sqlglm(char *, unsigned int *, unsigned int *);
+
+RCSID("$Header$");
+
+int generate_service(char *name, int force);
+void do_hosts(char *service);
+int dcm_send_file(char *service, char *host, char *target);
+int dcm_execute(char *service, char *host, char *script);
+void dbmserr(void);
+
EXEC SQL WHENEVER SQLERROR DO dbmserr();
#define SQL_NO_MATCH 1403
while (waitpid(0, &status, 0) > 0)
;
com_err(whoami, 0, "exiting");
+ exit(0);
}
int generate_service(char *name, int force)
EXEC SQL BEGIN DECLARE SECTION;
int interval, dfcheck, status;
time_t now;
- char *errmsg;
+ const char *errmsg;
EXEC SQL END DECLARE SECTION;
char dfgen_prog[64], dfgen_cmd[128];
struct sigaction action, prevaction;
void do_hosts(char *service)
{
EXEC SQL BEGIN DECLARE SECTION;
- char type[16], host[73], target[64], script[128], *errmsg;
- int status = 0, mid, dfgen, replicated;
+ char type[16], host[73], target[64], script[128];
+ const char *errmsg;
+ int status = 0, dfgen, replicated;
time_t now;
EXEC SQL END DECLARE SECTION;