diff options
author | gordon <gordon@FreeBSD.org> | 2002-06-13 22:14:37 +0000 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2002-06-13 22:14:37 +0000 |
commit | 9c5433cb225f7a4e56e87623ea2e4011179553a5 (patch) | |
tree | 3168589e209abd888b033397e3c46dee6131a116 /etc/rc.d/ttys | |
parent | 50d99cdfecd92f5323a18aa791a5b1cb9d8b7191 (diff) | |
download | FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.zip FreeBSD-src-9c5433cb225f7a4e56e87623ea2e4011179553a5.tar.gz |
Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.
Submitted by: Mike Makonnen <makonnen@pacbell.net>
Reviewed by: silence on -current and -hackers
Prodded by: rwatson
Diffstat (limited to 'etc/rc.d/ttys')
-rwxr-xr-x | etc/rc.d/ttys | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/etc/rc.d/ttys b/etc/rc.d/ttys index 6e12854..d9073f8 100755 --- a/etc/rc.d/ttys +++ b/etc/rc.d/ttys @@ -1,10 +1,12 @@ #!/bin/sh # # $NetBSD: ttys,v 1.1.1.1 2000/03/10 11:53:24 lukem Exp $ +# $FreeBSD$ # # PROVIDE: tty # REQUIRE: root +# KEYWORD: FreeBSD NetBSD . /etc/rc.subr @@ -14,18 +16,34 @@ stop_cmd=":" ttyflags_start() { - # set flags on ttys. - # (do early, in case they use tty for SLIP in network) - # - echo "Setting tty flags." - ttyflags -a + case `${CMD_OSTYPE}` in + FreeBSD) - # setup ptys - # - # XXX: there may be more ptys than this; maybe use - # sysctl to find out how many? - # - chmod 666 /dev/tty[pqrs]* + # Whack the pty perms back into shape. + # XXX: there may be more ptys than this; maybe use + # sysctl to find out how many? + # + if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then + chflags 0 /dev/tty[pqrsPQRS]* + chmod 666 /dev/tty[pqrsPQRS]* + chown root:wheel /dev/tty[pqrsPQRS]* + fi + ;; + NetBSD) + # set flags on ttys. + # (do early, in case they use tty for SLIP in network) + # + echo "Setting tty flags." + ttyflags -a + + # setup ptys + # + # XXX: there may be more ptys than this; maybe use + # sysctl to find out how many? + # + chmod 666 /dev/tty[pqrs]* + ;; + esac } load_rc_config $name |