summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1998-04-18 20:17:37 +0000
committerPeter Wemm <peter@FreeBSD.org>1998-04-18 20:17:37 +0000
commit514479cd0eebc22bf8ce31228f1187ca3b36a35c (patch)
tree0d5280784eeee1a0a12fd5a831bb71473a14ba0e /comms
parentOriginal distribution was updated. (diff)
Tweak autologin to get it to the point where it appears to work..
Move 'console' to /usr/local/bin rather than /usr/local/sbin since there's nothing about it that requires superuser access in any way.
Notes
Notes: svn path=/head/; revision=10565
Diffstat (limited to 'comms')
-rw-r--r--comms/conserver/files/Makefile2
-rw-r--r--comms/conserver/files/patch-ae2
-rw-r--r--comms/conserver/files/patch-ah74
-rw-r--r--comms/conserver/files/patch-ai17
-rw-r--r--comms/conserver/pkg-plist3
5 files changed, 95 insertions, 3 deletions
diff --git a/comms/conserver/files/Makefile b/comms/conserver/files/Makefile
index fddd381bcf0b..1eb51e9c81de 100644
--- a/comms/conserver/files/Makefile
+++ b/comms/conserver/files/Makefile
@@ -1,3 +1,3 @@
-SUBDIR= conserver.cf conserver console
+SUBDIR= autologin conserver.cf conserver console
.include <bsd.subdir.mk>
diff --git a/comms/conserver/files/patch-ae b/comms/conserver/files/patch-ae
index 55ea5caa14cc..b645ba0f8ebe 100644
--- a/comms/conserver/files/patch-ae
+++ b/comms/conserver/files/patch-ae
@@ -6,7 +6,7 @@
PROG= console
-ETC= ${DESTDIR}/usr/local/etc
-DOC= ${DESTDIR}/usr/local/man
-+ETC= ${DESTDIR}/usr/local/sbin
++ETC= ${DESTDIR}/usr/local/bin
+DOC= ${DESTDIR}/usr/local/man/man8
I=/usr/include
diff --git a/comms/conserver/files/patch-ah b/comms/conserver/files/patch-ah
new file mode 100644
index 000000000000..0cd3a9b9c85c
--- /dev/null
+++ b/comms/conserver/files/patch-ah
@@ -0,0 +1,74 @@
+--- autologin/autologin.c.orig Sun Apr 19 04:04:45 1998
++++ autologin/autologin.c Sun Apr 19 04:13:14 1998
+@@ -22,7 +22,7 @@
+
+
+ #include <errno.h>
+-#if !defined IBMR2
++#if !defined IBMR2 && !defined FREEBSD
+ extern char *sys_errlist[];
+ #define strerror(Me) (sys_errlist[Me])
+ #endif
+@@ -118,14 +118,16 @@
+ #if defined(FREEBSD)
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
++#include <sys/termios.h>
+ #include <sys/uio.h>
+ #include <sys/proc.h>
+ #include <sys/ioctl_compat.h>
+-#define setsid() getpid()
+-#define getsid(Mp) (Mp)
+-#define USE_IOCTL 1
++#include <sys/ttydefaults.h>
++#define getsid(Mp) (-1)
++#define USE_TC 1
+ #define USE_OLD_UTENT 1
+-#define PATH_SU "/usr/ucb/su"
++#define PATH_SU "/usr/bin/su"
++#define UTMP_PATH "/var/run/utmp"
+ #else
+
+ #include <sys/termios.h>
+@@ -348,6 +350,11 @@
+ dup(0);
+ dup(0);
+ }
++#ifdef TIOCSCTTY
++ if (ioctl(0, TIOCSCTTY, NULL) == -1) {
++ (void) fprintf(stderr, "%s: TIOCSCTTY: %s\n", progname, strerror(errno));
++ }
++#endif
+
+ /* put the tty in out process group
+ */
+@@ -439,6 +446,21 @@
+ /* NOTREACHED */
+ }
+ #endif
++#ifdef FREEBSD
++ n_tio.c_iflag = TTYDEF_IFLAG;
++ n_tio.c_oflag = TTYDEF_OFLAG;
++ n_tio.c_lflag = TTYDEF_LFLAG;
++ n_tio.c_cc[VEOF] = CEOF;
++ n_tio.c_cc[VEOL] = CEOL;
++ n_tio.c_cc[VERASE] = CERASE;
++ n_tio.c_cc[VINTR] = CINTR;
++ n_tio.c_cc[VSTATUS] = CSTATUS;
++ n_tio.c_cc[VKILL] = CKILL;
++ n_tio.c_cc[VQUIT] = CQUIT;
++ n_tio.c_cc[VSUSP] = CSUSP;
++ n_tio.c_cc[VSTART] = CSTART;
++ n_tio.c_cc[VSTOP] = CSTOP;
++#else
+ n_tio.c_iflag &= ~(IGNCR|IUCLC);
+ n_tio.c_iflag |= ICRNL|IXON|IXANY;
+ n_tio.c_oflag &= ~(OLCUC|ONOCR|ONLRET|OFILL|NLDLY|CRDLY|TABDLY|BSDLY);
+@@ -455,6 +477,7 @@
+ n_tio.c_cc[VSTART] = '\021'; /* ^Q */
+ n_tio.c_cc[VSTOP] = '\023'; /* ^S */
+ n_tio.c_cc[VSUSP] = '\032'; /* ^Z */
++#endif
+ #if USE_TC
+ if (0 != tcsetattr(0, TCSANOW, &n_tio)) {
+ (void) fprintf(stderr, "%s: tcsetattr: %s\n", progname, strerror(errno));
diff --git a/comms/conserver/files/patch-ai b/comms/conserver/files/patch-ai
new file mode 100644
index 000000000000..bac986c527da
--- /dev/null
+++ b/comms/conserver/files/patch-ai
@@ -0,0 +1,17 @@
+--- autologin/Makefile Sun Apr 19 03:51:53 1998
++++ autologin/Makefile Sun Apr 19 03:54:02 1998
+@@ -7,11 +7,11 @@
+ #
+
+ DESTDIR=
+-BINDIR= ${DESTDIR}/usr/local/etc
++BINDIR= ${DESTDIR}/usr/local/sbin
+
+ INCLUDE=
+-DEBUG= -g
+-DEFS= -DPUCC -DSUN5
++DEBUG= -O
++DEFS= -DFREEBSD
+ CFLAGS= ${DEBUG} ${DEFS} ${INCLUDE}
+
+ GENC= main.c
diff --git a/comms/conserver/pkg-plist b/comms/conserver/pkg-plist
index d7d52f6ed184..3b0cf3c9e1c2 100644
--- a/comms/conserver/pkg-plist
+++ b/comms/conserver/pkg-plist
@@ -1,7 +1,8 @@
+bin/console
etc/conserver.cf.eg
etc/rc.d/conserver.sh
man/man5/conserver.cf.5.gz
man/man8/conserver.8.gz
man/man8/console.8.gz
+sbin/autologin
sbin/conserver
-sbin/console