SCCS-vsn: sbin/slattach/Makefile 5.3
SCCS-vsn: sbin/slattach/slattach.c 4.4
# 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%
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
#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%";
#include <sys/param.h>
#include <sgtty.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <sgtty.h>
#include <sys/socket.h>
#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;
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) {