file reorg, pathnames.h, paths.h
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 12 May 1989 01:55:47 +0000 (17:55 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 12 May 1989 01:55:47 +0000 (17:55 -0800)
SCCS-vsn: bin/expr/Makefile 5.2
SCCS-vsn: usr.bin/false/Makefile 5.2
SCCS-vsn: usr.bin/compress/Makefile 5.10
SCCS-vsn: usr.bin/compress/usermem.sh 5.6
SCCS-vsn: old/sysline/Makefile 5.7
SCCS-vsn: old/sysline/sysline.c 5.13

usr/src/bin/expr/Makefile
usr/src/old/sysline/Makefile
usr/src/old/sysline/sysline.c
usr/src/usr.bin/compress/Makefile
usr/src/usr.bin/compress/usermem.sh
usr/src/usr.bin/false/Makefile

index 4104aff..5cc4804 100644 (file)
@@ -14,7 +14,7 @@
 # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
 # FITNESS FOR A PARTICULAR PURPOSE.
 #
 # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
 # FITNESS FOR A PARTICULAR PURPOSE.
 #
-# @(#)Makefile 5.1 (Berkeley) %G%
+# @(#)Makefile 5.2 (Berkeley) %G%
 #
 
 CFLAGS=        -O
 #
 
 CFLAGS=        -O
@@ -38,7 +38,7 @@ depend: ${SRCS}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
-       install -s -o bin -g bin -m 755 expr ${DESTDIR}/bin
+       install -s -o bin -g bin -m 755 expr ${DESTDIR}/usr/bin
        install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
 
 lint: ${SRCS}
        install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
 
 lint: ${SRCS}
index 522d780..ff92a8e 100644 (file)
@@ -14,7 +14,7 @@
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-#      @(#)Makefile    5.6 (Berkeley) %G%
+#      @(#)Makefile    5.7 (Berkeley) %G%
 #
 CFLAGS=        -O
 LIBC=  /lib/libc.a
 #
 CFLAGS=        -O
 LIBC=  /lib/libc.a
@@ -37,7 +37,7 @@ depend: ${SRCS}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
-       install -s -o bin -g kmem -m 2755 sysline ${DESTDIR}/usr/ucb/sysline
+       install -s -o bin -g kmem -m 2755 sysline ${DESTDIR}/usr/bin
        install -c -o bin -g bin -m 444 sysline.0 ${DESTDIR}/usr/man/cat1
 
 lint: ${SRCS}
        install -c -o bin -g bin -m 444 sysline.0 ${DESTDIR}/usr/man/cat1
 
 lint: ${SRCS}
index 6a2db97..35702a4 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)sysline.c  5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)sysline.c  5.13 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -72,7 +72,6 @@ static char sccsid[] = "@(#)sysline.c 5.12 (Berkeley) %G%";
 
 #define NETPREFIX "ucb"
 #define DEFDELAY 60            /* update status once per minute */
 
 #define NETPREFIX "ucb"
 #define DEFDELAY 60            /* update status once per minute */
-#define MAILDIR "/usr/spool/mail"
 /*
  * if MAXLOAD is defined, then if the load average exceeded MAXLOAD
  * then the process table will not be scanned and the log in/out data
 /*
  * if MAXLOAD is defined, then if the load average exceeded MAXLOAD
  * then the process table will not be scanned and the log in/out data
@@ -110,7 +109,6 @@ static char sccsid[] = "@(#)sysline.c       5.12 (Berkeley) %G%";
 #include <protocols/rwhod.h>
 
 #define        DOWN_THRESHOLD  (11 * 60)
 #include <protocols/rwhod.h>
 
 #define        DOWN_THRESHOLD  (11 * 60)
-#define        RWHOLEADER      "/usr/spool/rwho/whod."
 
 struct remotehost {
        char *rh_host;
 
 struct remotehost {
        char *rh_host;
@@ -119,6 +117,8 @@ struct remotehost {
 int nremotes = 0;
 #endif RWHO
 
 int nremotes = 0;
 #endif RWHO
 
+#include "pathnames.h"
+
 struct nlist nl[] = {
 #ifdef NEW_BOOTTIME
        { "_boottime" },        /* After 4.1a the label changed to "boottime" */
 struct nlist nl[] = {
 #ifdef NEW_BOOTTIME
        { "_boottime" },        /* After 4.1a the label changed to "boottime" */
@@ -138,7 +138,7 @@ struct nlist nl[] = {
 };
 
        /* stuff for the kernel */
 };
 
        /* stuff for the kernel */
-int kmem;                      /* file descriptor for /dev/kmem */
+int kmem;                      /* file descriptor for _PATH_KMEM */
 struct proc *proc, *procNPROC;
 int nproc;
 int procadr;
 struct proc *proc, *procNPROC;
 int nproc;
 int procadr;
@@ -409,8 +409,8 @@ main(argc,argv)
        strcpy1(strcpy1(whofilename2, home), "/.sysline");
        strcpy1(strcpy1(lockfilename, home), "/.syslinelock");
 
        strcpy1(strcpy1(whofilename2, home), "/.sysline");
        strcpy1(strcpy1(lockfilename, home), "/.syslinelock");
 
-       if ((kmem = open("/dev/kmem",0)) < 0) {
-               fprintf(stderr, "Can't open kmem.\n");
+       if ((kmem = open(_PATH_KMEM,0)) < 0) {
+               fprintf(stderr, "Can't open %s\n", _PATH_KMEM);
                exit(1);
        }
        readnamelist();
                exit(1);
        }
        readnamelist();
@@ -420,7 +420,7 @@ main(argc,argv)
                if ((username = getenv("USER")) == 0)
                        mailcheck = 0;
                else {
                if ((username = getenv("USER")) == 0)
                        mailcheck = 0;
                else {
-                       chdir(MAILDIR);
+                       chdir(_PATH_MBOX);
                        if (stat(username, &mstbuf) >= 0)
                                mailsize = mstbuf.st_size;
                        else
                        if (stat(username, &mstbuf) >= 0)
                                mailsize = mstbuf.st_size;
                        else
@@ -459,11 +459,7 @@ readnamelist()
 {
        time_t bootime, clock, nintv, time();
 
 {
        time_t bootime, clock, nintv, time();
 
-#ifdef pdp11
-       nlist("/unix", nl);
-#else
-       nlist("/vmunix", nl);
-#endif
+       nlist(_PATH_UNIX, nl);
        if (nl[0].n_value == 0) {
                if (!quiet)
                        fprintf(stderr, "No namelist\n");
        if (nl[0].n_value == 0) {
                if (!quiet)
                        fprintf(stderr, "No namelist\n");
@@ -488,8 +484,8 @@ readutmp(nflag)
        static off_t utmpsize;          /* ditto */
        struct stat st;
 
        static off_t utmpsize;          /* ditto */
        struct stat st;
 
-       if (ut < 0 && (ut = open("/etc/utmp", 0)) < 0) {
-               fprintf(stderr, "sysline: Can't open utmp.\n");
+       if (ut < 0 && (ut = open(_PATH_UTMP, 0)) < 0) {
+               fprintf(stderr, "sysline: Can't open %s.\n", _PATH_UTMP);
                exit(1);
        }
        if (fstat(ut, &st) < 0 || st.st_mtime == lastmod)
                exit(1);
        }
        if (fstat(ut, &st) < 0 || st.st_mtime == lastmod)
@@ -1108,8 +1104,8 @@ clearbotl()
                close(fd);
        }
 #ifdef PROF
                close(fd);
        }
 #ifdef PROF
-       if (chdir("/usr/src/ucb/sysline") < 0)
-               (void) chdir("/tmp");
+       if (chdir(_PATH_SYSLINE) < 0)
+               (void) chdir(_PATH_TMP);
 #endif
        exit(0);
 }
 #endif
        exit(0);
 }
@@ -1265,9 +1261,9 @@ sysrup(hp)
                /*
                 * Try rwho hostname file, and if that fails try ucbhostname.
                 */
                /*
                 * Try rwho hostname file, and if that fails try ucbhostname.
                 */
-               (void) strcpy1(strcpy1(filename, RWHOLEADER), hp->rh_host);
+               (void) strcpy1(strcpy1(filename, _PATH_RWHO), hp->rh_host);
                if ((hp->rh_file = open(filename, 0)) < 0) {
                if ((hp->rh_file = open(filename, 0)) < 0) {
-                       (void) strcpy1(strcpy1(strcpy1(filename, RWHOLEADER),
+                       (void) strcpy1(strcpy1(strcpy1(filename, _PATH_RWHO),
                                NETPREFIX), hp->rh_host);
                        hp->rh_file = open(filename, 0);
                }
                                NETPREFIX), hp->rh_host);
                        hp->rh_file = open(filename, 0);
                }
index 270204b..f09f0fb 100644 (file)
@@ -14,7 +14,7 @@
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-#      @(#)Makefile    5.9 (Berkeley) %G%
+#      @(#)Makefile    5.10 (Berkeley) %G%
 #
 CFLAGS=        -O -DBSD4_2 -DSACREDMEM=256000 -DUSERMEM=`cat USERMEM` 
 LIBC=  /lib/libc.a
 #
 CFLAGS=        -O -DBSD4_2 -DSACREDMEM=256000 -DUSERMEM=`cat USERMEM` 
 LIBC=  /lib/libc.a
@@ -43,13 +43,15 @@ depend: ${SRCS}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
-       install -s -o bin -g bin -m 755 compress ${DESTDIR}/usr/ucb/compress
-       rm -f ${DESTDIR}/usr/ucb/uncompress ${DESTDIR}/usr/ucb/zcat
-       ln ${DESTDIR}/usr/ucb/compress ${DESTDIR}/usr/ucb/uncompress
-       ln ${DESTDIR}/usr/ucb/compress ${DESTDIR}/usr/ucb/zcat
-       rm -f ${DESTDIR}/usr/man/cat1/uncompress.0 ${DESTDIR}/usr/man/cat1/zcat.0
+       install -s -o bin -g bin -m 755 compress ${DESTDIR}/usr/bin
+       rm -f ${DESTDIR}/usr/bin/uncompress ${DESTDIR}/usr/bin/zcat
+       ln ${DESTDIR}/usr/bin/compress ${DESTDIR}/usr/bin/uncompress
+       ln ${DESTDIR}/usr/bin/compress ${DESTDIR}/usr/bin/zcat
+       rm -f ${DESTDIR}/usr/man/cat1/uncompress.0 \
+           ${DESTDIR}/usr/man/cat1/zcat.0
        install -c -o bin -g bin -m 444 compress.0 ${DESTDIR}/usr/man/cat1
        install -c -o bin -g bin -m 444 compress.0 ${DESTDIR}/usr/man/cat1
-       ln ${DESTDIR}/usr/man/cat1/compress.0 ${DESTDIR}/usr/man/cat1/uncompress.0
+       ln ${DESTDIR}/usr/man/cat1/compress.0 \
+           ${DESTDIR}/usr/man/cat1/uncompress.0
        ln ${DESTDIR}/usr/man/cat1/compress.0 ${DESTDIR}/usr/man/cat1/zcat.0
 
 lint: ${SRCS}
        ln ${DESTDIR}/usr/man/cat1/compress.0 ${DESTDIR}/usr/man/cat1/zcat.0
 
 lint: ${SRCS}
index 0827c64..336eca5 100644 (file)
@@ -19,7 +19,7 @@
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-#      @(#)usermem.sh  5.5 (Berkeley) %G%
+#      @(#)usermem.sh  5.6 (Berkeley) %G%
 #
 : This shell script snoops around to find the maximum amount of available
 : user memory.  These variables need to be set only if there is no
 #
 : This shell script snoops around to find the maximum amount of available
 : user memory.  These variables need to be set only if there is no
@@ -53,9 +53,9 @@ fi
 
 SIZE=0
 # messages: probably the most transportable
 
 SIZE=0
 # messages: probably the most transportable
-if test -r /usr/adm/messages -a -s /usr/adm/messages
+if test -r /var/log/messages -a -s /var/log/messages
 then
 then
-    SIZE=`grep avail /usr/adm/messages | sed -n '$s/.*[        ]//p'`
+    SIZE=`grep avail /var/log/messages | sed -n '$s/.*[        ]//p'`
 fi
 
 if test 0$SIZE -le 0           # no SIZE in /usr/adm/messages
 fi
 
 if test 0$SIZE -le 0           # no SIZE in /usr/adm/messages
index a861b4a..2e08269 100644 (file)
@@ -14,7 +14,7 @@
 # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
 # FITNESS FOR A PARTICULAR PURPOSE.
 #
 # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
 # FITNESS FOR A PARTICULAR PURPOSE.
 #
-# @(#)Makefile 5.1 (Berkeley) %G%
+# @(#)Makefile 5.2 (Berkeley) %G%
 #
 
 CFLAGS=        -O
 #
 
 CFLAGS=        -O
@@ -38,7 +38,7 @@ depend: ${SRCS}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
        mkdep -p ${CFLAGS} ${SRCS}
 
 install: ${MAN}
-       install -s -o bin -g bin -m 755 false ${DESTDIR}/bin
+       install -s -o bin -g bin -m 755 false ${DESTDIR}/usr/bin
        install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
 
 lint: ${SRCS}
        install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
 
 lint: ${SRCS}