3 * SMS database consistency checker
5 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
20 struct hash *users, *machines, *clusters, *lists, *filesys, *nfsphys, *strings;
36 while (++arg - argv < argc) {
40 debug = atoi((*arg)[2] ? *arg+2 : *++arg);
65 printf("Only doing counts\n");
67 printf("Doing fast version (skipping some checks)\n");
69 printf("Will NOT modify the database\n");
70 else if (mode == MODE_PREEN)
71 printf("Will fix simple things without asking\n");
72 else if (mode == MODE_YES)
73 printf("Will fix everything without asking\n");
75 printf("Debug level is %d\n", debug);
77 signal(SIGHUP, cleanup);
78 signal(SIGQUIT, cleanup);
79 signal(SIGINT, cleanup);
82 printf("Opening database %s...", database);
86 ## retrieve (dcmenable = values.value) where values.name = "dcm_enable"
87 dprintf("DCM disabled (was %d)\n", dcmenable);
88 ## replace values (value = 0) where values.name = "dcm_enable"
97 printf("Skipping to counts\n");
103 ## replace values (value = dcmenable) where values.name = "dcm_enable"
112 printf("An ingres error occuurred, code %d\n", *num);
113 printf("Aborting...\n");
121 printf("Signal caught, aborting transaction\n");
123 ## replace values (value = dcmenable) where values.name = "dcm_enable"