#include <ctype.h>
-#define HESIOD_DIR "/u1/sms/dcm/hesiod"
+char hesiod_dir[64];
#define min(x,y) ((x) < (y) ? (x) : (y))
struct hash *machines = NULL;
IIseterr(ingerr);
initialize_sms_error_table ();
+ sprintf(hesiod_dir, "%s/hesiod", DCM_DIR);
## ingres sms
## set lockmode session where level = table
if (argc == 2) {
fprintf(stderr, "Building tar file.\n");
- sprintf(cmd, "cd %s; tar cf %s .", HESIOD_DIR, argv[1]);
+ sprintf(cmd, "cd %s; tar cf %s .", hesiod_dir, argv[1]);
if (system(cmd))
exit(SMS_TAR_FAIL);
}
## char nn[17], ptype[9];
## int uid, flag1, flag2, id, pid;
- sprintf(poutf, "%s/passwd.db", HESIOD_DIR);
- sprintf(uoutf, "%s/uid.db", HESIOD_DIR);
- sprintf(boutf, "%s/pobox.db", HESIOD_DIR);
+ sprintf(poutf, "%s/passwd.db", hesiod_dir);
+ sprintf(uoutf, "%s/uid.db", hesiod_dir);
+ sprintf(boutf, "%s/pobox.db", hesiod_dir);
if (stat(poutf, &psb) == 0 && stat(uoutf, &usb) == 0 &&
stat(boutf, &bsb) == 0) {
## int gid, id, lid, flag1, flag2, flag3, maxid;
/* open files */
- sprintf(ioutf, "%s/gid.db", HESIOD_DIR);
- sprintf(goutf, "%s/group.db", HESIOD_DIR);
- sprintf(loutf, "%s/grplist.db", HESIOD_DIR);
+ sprintf(ioutf, "%s/gid.db", hesiod_dir);
+ sprintf(goutf, "%s/group.db", hesiod_dir);
+ sprintf(loutf, "%s/grplist.db", hesiod_dir);
if (stat(ioutf, &isb) == 0 && stat(goutf, &gsb) == 0 && stat(loutf, &lsb) == 0) {
ftime = min(isb.st_mtime, min(gsb.st_mtime, lsb.st_mtime));
## int flag1, flag2, flag3, flag4, id, fid;
char *index();
- sprintf(outf, "%s/filsys.db", HESIOD_DIR);
+ sprintf(outf, "%s/filsys.db", hesiod_dir);
if (stat(outf, &sb) == 0) {
ftime = sb.st_mtime;
## char name[33], label[17], data[33], *filetime;
set_mask **machs, *ms, *ps;
- sprintf(outf, "%s/cluster.db", HESIOD_DIR);
+ sprintf(outf, "%s/cluster.db", hesiod_dir);
if (stat(outf, &sb) == 0) {
ftime = sb.st_mtime;
## char name[17], rp[17], sd[33], rm[33], *filetime;
## int flag;
- sprintf(outf, "%s/printcap.db", HESIOD_DIR);
+ sprintf(outf, "%s/printcap.db", hesiod_dir);
if (stat(outf, &sb) == 0) {
ftime = sb.st_mtime;
## char name[33], rm[33], trans[129], *filetime;
## int flag, flag1, ident;
- sprintf(outf, "%s/palladium.db", HESIOD_DIR);
+ sprintf(outf, "%s/palladium.db", hesiod_dir);
if (stat(outf, &sb) == 0) {
ftime = sb.st_mtime;
## char service[17], *filetime;
## int port, flag1, flag2, id;
- sprintf(outf, "%s/sloc.db", HESIOD_DIR);
+ sprintf(outf, "%s/sloc.db", hesiod_dir);
if (stat(outf, &sb) == 0) {
ftime = sb.st_mtime;
## char mach[33], service[33], protocol[9], altserv[129], *filetime;
## int port, flag1, flag2;
- sprintf(outf, "%s/service.db", HESIOD_DIR);
+ sprintf(outf, "%s/service.db", hesiod_dir);
if (stat(outf, &sb) == 0) {
ftime = sb.st_mtime;