]> andersk Git - moira.git/commitdiff
moved directory definitions
authormar <mar>
Fri, 8 Sep 1989 17:57:54 +0000 (17:57 +0000)
committermar <mar>
Fri, 8 Sep 1989 17:57:54 +0000 (17:57 +0000)
dcm/startdcm.c
include/dcm.h
reg_svr/startreg.c
server/startmoira.c

index 6a36c6b105c34d3a6045c1936aaf1f1dd39b1962..7ba2b07bf808fe666095a4b5ac93c8c9d9a8b5c5 100644 (file)
@@ -23,10 +23,9 @@ static char *rcsid_sms_starter_c = "$Header$";
 #include <sys/wait.h>
 #include <sys/signal.h>
 #include <sys/ioctl.h>
+#include <sms_app.h>
 
-#define SMS_LOG_FILE "/u1/sms/dcm.log"
-
-#define SMS_PROG "/u1/sms/bin/dcm"
+#define PROG   "dcm"
 
 int rdpipe[2];
 char *sigdescr[] = {
@@ -106,9 +105,10 @@ main(argc, argv)
        setreuid(0);
        signal(SIGCHLD, cleanup);
        
-       logf = open(SMS_LOG_FILE, O_CREAT|O_WRONLY|O_APPEND, 0640);
+       sprintf(buf, "%s/%s.log", SMS_DIR, PROG);
+       logf = open(buf, O_CREAT|O_WRONLY|O_APPEND, 0640);
        if (logf<0) {
-               perror(SMS_LOG_FILE);
+               perror(buf);
                exit(1);
        }
        inf = open("/dev/null", O_RDONLY , 0);
@@ -131,6 +131,7 @@ main(argc, argv)
        tty = open("/dev/tty");
        ioctl(tty, TIOCNOTTY, 0);
        close(tty);
+       sprintf(buf, "%s/%s", BIN_DIR, PROG);
        
        if ((pid = fork()) == 0) {
                
@@ -138,7 +139,7 @@ main(argc, argv)
                dup2(rdpipe[1], 1);
                dup2(1,2);
                for (i = 3; i <nfds; i++) close(i);
-               execl(SMS_PROG, "dcm", 0);
+               execl(buf, PROG, 0);
                perror("cannot run dcm");
                exit(1);
        }
index 2cbc7c0ec3eed03249aa68eeb886e9fb4ddc9644..e8f893eefde3d29b6c29acc44846fa456bd1dee7 100644 (file)
@@ -9,8 +9,6 @@
 #define HARD_FAIL(x)   (((x) != 0 ) && ((x) != SMS_NO_CHANGE))
 #define SOFT_FAIL(x)   (((x) == SMS_NO_MEM) || ((x) == SMS_CANT_CONNECT) || ((x) == SMS_CCONFIG) || ((x) == SMS_DEADLOCK))
 
-#define SMS_DIR                "/u1/sms"
-#define LOCK_DIR       "/u1/sms/dcm/locks"
 #define UMASK          0007
 
 extern char *malloc(), *calloc(), *realloc();
index 7e2b7b4c079d3a997affd6db4e81f5cc297e8437..721d6594b00f1af02e04da1c044c9f0bf44f321f 100644 (file)
@@ -23,10 +23,9 @@ static char *rcsid_sms_starter_c = "$Header$";
 #include <sys/wait.h>
 #include <sys/signal.h>
 #include <sys/ioctl.h>
+#include <sms_app.h>
 
-#define SMS_LOG_FILE "/u1/sms/reg_svr.log"
-
-#define SMS_PROG "/u1/sms/bin/reg_svr"
+#define PROG   "reg_svr"
 
 int rdpipe[2];
 char *sigdescr[] = {
@@ -106,9 +105,10 @@ main(argc, argv)
        setreuid(0);
        signal(SIGCHLD, cleanup);
        
-       logf = open(SMS_LOG_FILE, O_CREAT|O_WRONLY|O_APPEND, 0640);
+       sprintf(buf, "%s/%s.log", SMS_DIR, PROG);
+       logf = open(buf, O_CREAT|O_WRONLY|O_APPEND, 0640);
        if (logf<0) {
-               perror(SMS_LOG_FILE);
+               perror(buf);
                exit(1);
        }
        inf = open("/dev/null", O_RDONLY , 0);
@@ -131,6 +131,7 @@ main(argc, argv)
        tty = open("/dev/tty");
        ioctl(tty, TIOCNOTTY, 0);
        close(tty);
+       sprintf(buf, "%s/%s", BIN_DIR, PROG);
        
        if ((pid = fork()) == 0) {
                
@@ -138,7 +139,7 @@ main(argc, argv)
                dup2(rdpipe[1], 1);
                dup2(1,2);
                for (i = 3; i <nfds; i++) close(i);
-               execl(SMS_PROG, "reg_svr", 0);
+               execl(buf, PROG, 0);
                perror("cannot run reg_svr");
                exit(1);
        }
index 513674ff3410a0453795111fdc7c5c1b7a2bc588..9f252e0f916e1a38b1d07711b9f744f043420fbd 100644 (file)
@@ -24,10 +24,9 @@ static char *rcsid_sms_starter_c = "$Header$";
 #include <sys/wait.h>
 #include <sys/signal.h>
 #include <sys/ioctl.h>
+#include <sms_app.h>
 
-#define SMS_LOG_FILE "/u1/sms/sms.log"
-
-#define SMS_PROG "/u1/sms/bin/smsd"
+#define PROG   "smsd"
 
 int rdpipe[2];
 char *sigdescr[] = {
@@ -107,9 +106,10 @@ main(argc, argv)
        setreuid(0);
        signal(SIGCHLD, cleanup);
        
-       logf = open(SMS_LOG_FILE, O_CREAT|O_WRONLY|O_APPEND, 0640);
+       sprintf(buf, "%s/sms.log", SMS_DIR);
+       logf = open(buf, O_CREAT|O_WRONLY|O_APPEND, 0640);
        if (logf<0) {
-               perror(SMS_LOG_FILE);
+               perror(buf);
                exit(1);
        }
        inf = open("/dev/null", O_RDONLY , 0);
@@ -132,6 +132,7 @@ main(argc, argv)
        tty = open("/dev/tty");
        ioctl(tty, TIOCNOTTY, 0);
        close(tty);
+       sprintf(buf, "%s/%s", BIN_DIR, PROG);
        
        if ((pid = fork()) == 0) {
                
@@ -139,7 +140,7 @@ main(argc, argv)
                dup2(rdpipe[1], 1);
                dup2(1,2);
                for (i = 3; i <nfds; i++) close(i);
-               execl(SMS_PROG, "smsd", 0);
+               execl(buf, PROG, 0);
                perror("cannot run smsd");
                exit(1);
        }
This page took 0.117678 seconds and 5 git commands to generate.