]> andersk Git - moira.git/commitdiff
fixed prs delete command; added filesys stuff
authormar <mar>
Mon, 28 Aug 1989 15:11:47 +0000 (15:11 +0000)
committermar <mar>
Mon, 28 Aug 1989 15:11:47 +0000 (15:11 +0000)
incremental/afs.c

index b294fccce18ed97fdc5d787837f925e3ab849bb0..8d2cf2e9124ff487b01151e3e0933976cdc5b3a5 100644 (file)
@@ -14,6 +14,9 @@
 #include <krb_et.h>
 #include <afs/auth.h>
 #include <pwd.h>
+#include <sys/file.h>
+
+#define file_exists(file) (access((file), F_OK) == 0)
 
 #define LOCALCELL "sms_test.mit.edu"
 #define PRS    "/u1/sms/bin/prs"
@@ -195,7 +198,7 @@ int afterc;
        return;
     }
     if (afterc == 0 && !strcmp(before[LM_TYPE], "USER")) {
-       sprintf(cmd, "%s delete -user %s -group system:%s -cell %s",
+       sprintf(cmd, "%s remove -user %s -group system:%s -cell %s",
                PRS, before[LM_MEMBER], before[LM_LIST], LOCALCELL);
        do_cmd(cmd);
        return;
@@ -209,6 +212,13 @@ int beforec;
 char **after;
 int afterc;
 {
+    if (afterc < FS_CREATE)
+      return;
+    if (!strcmp("AFS", after[FS_TYPE]) && !strncmp("/afs", after[FS_PACK]) &&
+               !file_exists(after[FS_PACK])) {
+       critical_alert("incremental", "unable to create locker %s",
+                      after[FS_PACK]);
+    }
 }
 
 
This page took 0.037864 seconds and 5 git commands to generate.