NetBSD/etc/rc.d/ttys
mycroft 7d2e1537c5 Add an _rc_subr_loaded variable, set to ":" by rc.subr. Scripts can use this
for a speedup by doing:
$_rc_subr_loaded . /etc/rc.subr
2004-08-13 18:08:03 +00:00

39 lines
667 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: ttys,v 1.5 2004/08/13 18:08:03 mycroft Exp $
#
# PROVIDE: tty
# REQUIRE: root
$_rc_subr_loaded . /etc/rc.subr
name="ttyflags"
start_cmd="ttyflags_start"
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
# setup ptys
#
# XXX: there may be more ptys than this; maybe use
# sysctl kern.maxptys to find out how many?
#
chmod 666 /dev/tty[p-uw-zP-T][0-9a-zA-Z]
# only change ttyv* if ttyv0 is not reserved by a console.
#
if [ -c /dev/ttyv1 ]; then
chmod 666 /dev/ttyv[0-9a-zA-Z]
fi
}
load_rc_config $name
run_rc_command "$1"