]> andersk Git - moira.git/blobdiff - clients/mrcheck/mrcheck.c
changed ../db/dbbuild to ../db/newdb, since that's what the file is
[moira.git] / clients / mrcheck / mrcheck.c
index 50c50a371b92a21c7e0dcbb210c7363bc581e156..fc0a109b09f445bf422a32a793b0fe77999ab752 100644 (file)
@@ -77,13 +77,10 @@ main(argc, argv)
     char *argv[];
 
 {
-    char *args[6], buf[BUFSIZ], **service, **host;
+    char *args[6], buf[BUFSIZ], **service, **host, *motd;
     struct save_queue *services, *hosts;
     int count = 0, scream();
 
-    init_sms_err_tbl();
-    init_krb_err_tbl();
-
     if ((whoami = rindex(argv[0], '/')) == NULL)
        whoami = argv[0];
     else
@@ -99,6 +96,16 @@ main(argc, argv)
        goto punt;
     }
 
+    status = sms_motd(&motd);
+    if (status) {
+        com_err(whoami, status, " unable to check server status");
+       exit(2);
+    }
+    if (motd) {
+       fprintf(stderr, "The SMS server is currently unavailable:\n%s\n", motd);
+       sms_disconnect();
+       exit(2);
+    }
     status = sms_auth("smscheck");
     if (status) {
        (void) sprintf(buf, "\nAuthorization failure -- run \"kinit\" \
This page took 0.033617 seconds and 4 git commands to generate.