file system reorganization, pathnames.h
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 22 Apr 1989 01:07:04 +0000 (17:07 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 22 Apr 1989 01:07:04 +0000 (17:07 -0800)
SCCS-vsn: sbin/slattach/Makefile 5.3
SCCS-vsn: sbin/slattach/slattach.c 4.4

usr/src/sbin/slattach/Makefile
usr/src/sbin/slattach/slattach.c

index 372304b..3501ce5 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.2 (Berkeley) %G%
+# @(#)Makefile 5.3 (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 slattach ${DESTDIR}/etc/slattach
+       install -s -o bin -g bin -m 755 slattach ${DESTDIR}/sbin
        install -c -o bin -g bin -m 444 slattach.0 ${DESTDIR}/usr/man/cat8
        rm -f ${DESTDIR}/usr/man/cat8/slip.0
        ln ${DESTDIR}/usr/man/cat8/slattach.0 ${DESTDIR}/usr/man/cat8/slip.0
        install -c -o bin -g bin -m 444 slattach.0 ${DESTDIR}/usr/man/cat8
        rm -f ${DESTDIR}/usr/man/cat8/slip.0
        ln ${DESTDIR}/usr/man/cat8/slattach.0 ${DESTDIR}/usr/man/cat8/slip.0
index 7bced6a..830e797 100644 (file)
@@ -25,10 +25,9 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)slattach.c 4.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)slattach.c 4.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #endif /* not lint */
 
-#include <stdio.h>
 #include <sys/param.h>
 #include <sgtty.h>
 #include <sys/socket.h>
 #include <sys/param.h>
 #include <sgtty.h>
 #include <sys/socket.h>
@@ -36,6 +35,8 @@ static char sccsid[] = "@(#)slattach.c        4.3 (Berkeley) %G%";
 #include <net/if.h>
 #include <netdb.h>
 #include <fcntl.h>
 #include <net/if.h>
 #include <netdb.h>
 #include <fcntl.h>
+#include <stdio.h>
+#include "pathnames.h"
 
 #define DEFAULT_BAUD   9600
 int    slipdisc = SLIPDISC;
 
 #define DEFAULT_BAUD   9600
 int    slipdisc = SLIPDISC;
@@ -61,8 +62,8 @@ main(argc, argv)
                fprintf(stderr, "unknown speed %s", argv[2]);
                exit(1);
        }
                fprintf(stderr, "unknown speed %s", argv[2]);
                exit(1);
        }
-       if (strncmp("/dev/", dev, 5)) {
-               (void)sprintf(devname, "/dev/%s", dev);
+       if (strncmp(_PATH_DEV, dev, sizeof(_PATH_DEV) - 1)) {
+               (void)sprintf(devname, "%s/%s", _PATH_DEV, dev);
                dev = devname;
        }
        if ((fd = open(dev, O_RDWR | O_NDELAY)) < 0) {
                dev = devname;
        }
        if ((fd = open(dev, O_RDWR | O_NDELAY)) < 0) {