]> andersk Git - moira.git/commitdiff
changed directory definitions
authormar <mar>
Fri, 8 Sep 1989 14:53:05 +0000 (14:53 +0000)
committermar <mar>
Fri, 8 Sep 1989 14:53:05 +0000 (14:53 +0000)
incremental/afs.c
update/client.c

index c972a9eff34639491eecdaa0c013c8f083357274..834c522dbf4834eb871a09d1fc487fa05ce1745d 100644 (file)
@@ -18,9 +18,7 @@
 
 #define file_exists(file) (access((file), F_OK) == 0)
 
-#define PRS    "/u1/sms/bin/prs"
-#define FS     "/u1/sms/bin/fs"
-
+char prs[64], fs[64];
 
 char *whoami;
 
@@ -61,6 +59,8 @@ int argc;
 
     initialize_sms_error_table();
     initialize_krb_error_table();
+    sprintf(prs, "%s/prs", BIN_DIR);
+    sprintf(fs, "%s/fs", BIN_DIR);
 
     if (!strcmp(table, "users")) {
        do_user(before, beforec, after, afterc);
@@ -153,11 +153,11 @@ int afterc;
       return;
     if (astate == 1 && bstate != 1) {
        sprintf(cmd, "%s newuser -name %s -id %s",
-               PRS, after[U_NAME], after[U_UID]);
+               prs, after[U_NAME], after[U_UID]);
        do_cmd(cmd);
        return;
     } else if (astate != 1 && bstate == 1) {
-       sprintf(cmd, "%s delete %s", PRS, before[U_NAME]);
+       sprintf(cmd, "%s delete %s", prs, before[U_NAME]);
        do_cmd(cmd);
        return;
     }
@@ -171,7 +171,7 @@ int afterc;
     if (beforec > U_NAME && afterc > U_NAME &&
        strcmp(before[U_NAME], after[U_NAME])) {
        sprintf(cmd, "%s chname -oldname %s -newname %s",
-               PRS, before[U_NAME], after[U_NAME]);
+               prs, before[U_NAME], after[U_NAME]);
        do_cmd(cmd);
     }
 }
@@ -196,12 +196,12 @@ int afterc;
     if (bgid == 0 && agid != 0) {
        sprintf(cmd,
                "%s create -name system:%s -id %s -owner system:administrators",
-               PRS, after[L_NAME], after[L_GID]);
+               prs, after[L_NAME], after[L_GID]);
        do_cmd(cmd);
        return;
     }
     if (agid == 0 && bgid != 0) {
-       sprintf(cmd, "%s delete -name system:%s", PRS, before[L_NAME]);
+       sprintf(cmd, "%s delete -name system:%s", prs, before[L_NAME]);
        do_cmd(cmd);
        return;
     }
@@ -210,7 +210,7 @@ int afterc;
     if (strcmp(before[L_NAME], after[L_NAME])) {
        sprintf(cmd,
                "%s chname -oldname system:%s -newname system:%s",
-               PRS, before[L_NAME], after[L_NAME]);
+               prs, before[L_NAME], after[L_NAME]);
        do_cmd(cmd);
        return;
     }
@@ -227,13 +227,13 @@ int afterc;
 
     if (beforec == 0 && !strcmp(after[LM_TYPE], "USER")) {
        sprintf(cmd, "%s add -user %s -group system:%s",
-               PRS, after[LM_MEMBER], after[LM_LIST]);
+               prs, after[LM_MEMBER], after[LM_LIST]);
        do_cmd(cmd);
        return;
     }
     if (afterc == 0 && !strcmp(before[LM_TYPE], "USER")) {
        sprintf(cmd, "%s remove -user %s -group system:%s",
-               PRS, before[LM_MEMBER], before[LM_LIST]);
+               prs, before[LM_MEMBER], before[LM_LIST]);
        do_cmd(cmd);
        return;
     }
@@ -271,7 +271,7 @@ int afterc;
       return;
     if (afterc != 0) {
        sprintf(cmd, "%s setquota -dir %s -quota %s",
-               FS, after[Q_DIRECTORY], after[Q_QUOTA]);
+               fs, after[Q_DIRECTORY], after[Q_QUOTA]);
        do_cmd(cmd);
        return;
     }
index 0019c121cf938ead9d569408b39fcc9c95965a5a..49544df3f06b10ff4f37f26700f0c511382deb39 100644 (file)
@@ -35,6 +35,7 @@ static char *rcsid_client2_c = "$Header$";
 #include <errno.h>
 #include <dcm.h>
 #include <sms.h>
+#include <sms_app.h>
 #include <krb.h>
 
 extern char *malloc();
@@ -78,7 +79,7 @@ initialize()
  *     sms_update_server(service, machine, target_path)
  * DESCRIPTION:
  *     Attempts to perform an update to the named machine
- *     of the named service.  The file SMS_DIR/dcm/service.out
+ *     of the named service.  The file DCM_DIR/service.out
  *     will be sent, then the file SMS_DIR/bin/service.sh,
  *     the the shell script will be executed.
  * INPUT:
@@ -133,7 +134,7 @@ char *instructions;
           " target pathname");
     ASSERT2(target_path[0] == '/', SMS_NOT_UNIQUE,
           " non-absolute pathname supplied \"%s\"", target_path);
-    sprintf(buf, "%s/dcm/%s.out", SMS_DIR, service);
+    sprintf(buf, "%s/%s.out", DCM_DIR, service);
     pathname = strsave(buf);
     ASSERT(NONNULL(pathname), SMS_NO_MEM, " for pathname");
     ASSERT(NONNULL(instructions), SMS_NO_MEM, " for instructions");
This page took 0.192295 seconds and 5 git commands to generate.