From b528bd5ed8699a06cb9cbefbfd628df883cf352f Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Thu, 11 May 1989 17:55:47 -0800 Subject: [PATCH] file reorg, pathnames.h, paths.h 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 | 4 ++-- usr/src/old/sysline/Makefile | 4 ++-- usr/src/old/sysline/sysline.c | 32 +++++++++++++---------------- usr/src/usr.bin/compress/Makefile | 16 ++++++++------- usr/src/usr.bin/compress/usermem.sh | 6 +++--- usr/src/usr.bin/false/Makefile | 4 ++-- 6 files changed, 32 insertions(+), 34 deletions(-) diff --git a/usr/src/bin/expr/Makefile b/usr/src/bin/expr/Makefile index 4104affd81..5cc4804e22 100644 --- a/usr/src/bin/expr/Makefile +++ b/usr/src/bin/expr/Makefile @@ -14,7 +14,7 @@ # 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 @@ -38,7 +38,7 @@ depend: ${SRCS} 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} diff --git a/usr/src/old/sysline/Makefile b/usr/src/old/sysline/Makefile index 522d780594..ff92a8ee83 100644 --- a/usr/src/old/sysline/Makefile +++ b/usr/src/old/sysline/Makefile @@ -14,7 +14,7 @@ # 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 @@ -37,7 +37,7 @@ depend: ${SRCS} 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} diff --git a/usr/src/old/sysline/sysline.c b/usr/src/old/sysline/sysline.c index 6a2db97dd3..35702a4c9f 100644 --- a/usr/src/old/sysline/sysline.c +++ b/usr/src/old/sysline/sysline.c @@ -22,7 +22,7 @@ char copyright[] = #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 */ /* @@ -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 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 @@ -110,7 +109,6 @@ static char sccsid[] = "@(#)sysline.c 5.12 (Berkeley) %G%"; #include #define DOWN_THRESHOLD (11 * 60) -#define RWHOLEADER "/usr/spool/rwho/whod." struct remotehost { char *rh_host; @@ -119,6 +117,8 @@ struct remotehost { int nremotes = 0; #endif RWHO +#include "pathnames.h" + 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 */ -int kmem; /* file descriptor for /dev/kmem */ +int kmem; /* file descriptor for _PATH_KMEM */ 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"); - 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(); @@ -420,7 +420,7 @@ main(argc,argv) if ((username = getenv("USER")) == 0) mailcheck = 0; else { - chdir(MAILDIR); + chdir(_PATH_MBOX); if (stat(username, &mstbuf) >= 0) mailsize = mstbuf.st_size; else @@ -459,11 +459,7 @@ readnamelist() { 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"); @@ -488,8 +484,8 @@ readutmp(nflag) 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) @@ -1108,8 +1104,8 @@ clearbotl() 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); } @@ -1265,9 +1261,9 @@ sysrup(hp) /* * 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) { - (void) strcpy1(strcpy1(strcpy1(filename, RWHOLEADER), + (void) strcpy1(strcpy1(strcpy1(filename, _PATH_RWHO), NETPREFIX), hp->rh_host); hp->rh_file = open(filename, 0); } diff --git a/usr/src/usr.bin/compress/Makefile b/usr/src/usr.bin/compress/Makefile index 270204bbfd..f09f0fb083 100644 --- a/usr/src/usr.bin/compress/Makefile +++ b/usr/src/usr.bin/compress/Makefile @@ -14,7 +14,7 @@ # 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 @@ -43,13 +43,15 @@ depend: ${SRCS} 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 - 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} diff --git a/usr/src/usr.bin/compress/usermem.sh b/usr/src/usr.bin/compress/usermem.sh index 0827c6464b..336eca514e 100644 --- a/usr/src/usr.bin/compress/usermem.sh +++ b/usr/src/usr.bin/compress/usermem.sh @@ -19,7 +19,7 @@ # 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 @@ -53,9 +53,9 @@ fi 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 - 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 diff --git a/usr/src/usr.bin/false/Makefile b/usr/src/usr.bin/false/Makefile index a861b4a86f..2e08269631 100644 --- a/usr/src/usr.bin/false/Makefile +++ b/usr/src/usr.bin/false/Makefile @@ -14,7 +14,7 @@ # 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 @@ -38,7 +38,7 @@ depend: ${SRCS} 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} -- 2.20.1