diff options
Diffstat (limited to 'libexec/rc')
-rw-r--r-- | libexec/rc/rc.conf | 8 | ||||
-rw-r--r-- | libexec/rc/rc.d/Makefile | 3 | ||||
-rwxr-xr-x | libexec/rc/rc.d/bluetooth | 13 | ||||
-rwxr-xr-x | libexec/rc/rc.d/moused | 1 | ||||
-rwxr-xr-x | libexec/rc/rc.d/msconvd | 61 | ||||
-rwxr-xr-x | libexec/rc/rc.d/serial | 13 | ||||
-rwxr-xr-x | libexec/rc/rc.d/syscons | 2 |
7 files changed, 85 insertions, 16 deletions
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index bfa46bd343a6..0ef3012892dd 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -586,15 +586,19 @@ font8x14="NO" # font 8x14 from /usr/share/{syscons,vt}/fonts/* (or NO). font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO). blanktime="300" # blank time (in seconds) or "NO" to turn it off. saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko -moused_nondefault_enable="YES" # Treat non-default mice as enabled unless +moused_nondefault_enable="NO" # Treat non-default mice as enabled unless # specifically overridden in rc.conf(5). moused_enable="NO" # Run the mouse daemon. moused_type="auto" # See man page for rc.conf(5) for available settings. -moused_port="/dev/psm0" # Set to your mouse port. +moused_port="auto" # Set to your mouse port. moused_flags="" # Any additional flags to moused. mousechar_start="NO" # if 0xd0-0xd3 default range is occupied in your # language code table, specify alternative range # start like mousechar_start=3, see vidcontrol(1) +msconvd_enable="NO" # Run the mouse protocol conversion daemon. +msconvd_type="auto" # See rc.conf(5) man page for available moused_type-s. +msconvd_ports="" # List of msconvd ports. +msconvd_flags="" # Any additional flags to msconvd. allscreens_flags="" # Set this vidcontrol mode for all virtual screens allscreens_kbdflags="" # Set this kbdcontrol mode for all virtual screens diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index d0c6fc1dee46..e5ee34e62185 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -215,7 +215,7 @@ FTPD= ftpd FTPDPACKAGE= ftpd .endif -.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no" +.if ${MK_KERBEROS_SUPPORT} != "no" CONFGROUPS+= GSSD GSSD= gssd GSSDPACKAGE= gssd @@ -273,6 +273,7 @@ JAILPACKAGE= jail .if ${MK_LEGACY_CONSOLE} != "no" CONFGROUPS+= CONSOLE CONSOLE+= moused +CONSOLE+= msconvd CONSOLE+= syscons CONSOLEPACKAGE= console-tools .endif diff --git a/libexec/rc/rc.d/bluetooth b/libexec/rc/rc.d/bluetooth index 22bd5078034d..193fd969967f 100755 --- a/libexec/rc/rc.d/bluetooth +++ b/libexec/rc/rc.d/bluetooth @@ -127,8 +127,17 @@ bluetooth_setup_stack() > /dev/null 2>&1 || return 1 # Initilalize HCI node - ${hccontrol} -n ${dev}hci reset \ - > /dev/null 2>&1 || return 1 + for loop in 1 2 3 + do + ${hccontrol} -n ${dev}hci reset \ + > /dev/null 2>&1 && break + if [ ${loop} -eq 3 ] + then + warn Reset failed three times, giving up. + return 1 + fi + warn Reset failed, retrying. + done ${hccontrol} -n ${dev}hci read_bd_addr \ > /dev/null 2>&1 || return 1 diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused index 6f1b95af0f0a..aaf0dd0890a8 100755 --- a/libexec/rc/rc.d/moused +++ b/libexec/rc/rc.d/moused @@ -70,6 +70,7 @@ moused_start() esac for ttyv in /dev/ttyv* ; do + [ "$ttyv" = '/dev/ttyv*' ] && break vidcontrol < ${ttyv} ${mousechar_arg} -m on done } diff --git a/libexec/rc/rc.d/msconvd b/libexec/rc/rc.d/msconvd new file mode 100755 index 000000000000..c2a96bf2eb68 --- /dev/null +++ b/libexec/rc/rc.d/msconvd @@ -0,0 +1,61 @@ +#!/bin/sh +# +# + +# PROVIDE: msconvd +# REQUIRE: DAEMON FILESYSTEMS +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="msconvd" +desc="Mouse protocol conversion daemon" +command="/usr/sbin/${name}" +start_cmd="msconvd_start" +pidprefix="/var/run/msconvd" +load_rc_config $name + +: ${msconvd_enable="NO"} +: ${msconvd_type="auto"} + +# doesn't make sense to run in a svcj: nojail keyword +# XXX: How does msconvd communiacte with the kernel? +# XXX: Does the kernel prevent this communcation in jails? +msconvd_svcj="NO" + +# Set the pid file and variable name. The second argument, if it exists, is +# expected to be the mouse device. +# +if [ -n "$2" ]; then + eval msconvd_$2_enable=\${msconvd_$2_enable-${msconvd_enable}} + rcvar="msconvd_$2_enable" + pidfile="${pidprefix}.$2.pid" +else + for ms in ${msconvd_ports}; do + /etc/rc.d/msconvd $1 ${ms} + done + exit 0 +fi + +msconvd_start() +{ + local ms myflags myport mytype + + # Set the mouse device and get any related variables. If + # a msconvd device has been specified on the commandline, then + # rc.conf(5) variables defined for that device take precedence + # over the generic msconvd_* variables. The only exception is + # the msconvd_port variable, which if not defined sets it to + # the passed in device name. + # + ms=$1 + eval myflags=\${msconvd_${ms}_flags-$msconvd_flags} + eval myport=\${msconvd_${ms}_port-/dev/${ms}} + eval mytype=\${msconvd_${ms}_type-$msconvd_type} + + startmsg -n "Starting ${ms} ${name}" + ${command} ${myflags} -p ${myport} -t ${mytype} -I ${pidfile} + startmsg '.' +} + +run_rc_command $* diff --git a/libexec/rc/rc.d/serial b/libexec/rc/rc.d/serial index ea60c8aa77da..f8ddc7ff30d4 100755 --- a/libexec/rc/rc.d/serial +++ b/libexec/rc/rc.d/serial @@ -45,7 +45,7 @@ default() { # Reset everything changed by the other functions to initial defaults. dc=$1; shift # device name character - drainwait=`sysctl -n kern.drainwait` + drainwait=`sysctl -n kern.tty_drainwait` for i in $* do @@ -84,7 +84,7 @@ modem() { for i in $* do # may depend on modem - comcontrol /dev/tty${dc}${i} dtrwait 100 drainwait 180 + comcontrol /dev/tty${dc}${i} drainwait 180 # Lock crtscts on. # Speed reasonable for V42bis. stty < /dev/tty${dc}${i}.init crtscts 115200 @@ -156,12 +156,3 @@ terminal() { # modem u 1 # terminal u 0 # 3wire u 0 - -# Initialize all ports on a Cyclades-8yo. -# modem c 00 01 02 03 04 05 06 07 - -# Initialize all ports on a Cyclades-16ye. -# modem c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f - -# Initialize all ports on a Digiboard 8. -# modem D 00 01 02 03 04 05 06 07 diff --git a/libexec/rc/rc.d/syscons b/libexec/rc/rc.d/syscons index 325628a83d8c..b01b648ace6e 100755 --- a/libexec/rc/rc.d/syscons +++ b/libexec/rc/rc.d/syscons @@ -238,6 +238,7 @@ syscons_configure_keyboard() sc_init echo -n ' allscreens_kbd' for ttyv in /dev/ttyv*; do + [ "$ttyv" = '/dev/ttyv*' ] && break kbdcontrol ${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1 done fi @@ -382,6 +383,7 @@ syscons_start() sc_init echo -n ' allscreens' for ttyv in /dev/ttyv*; do + [ "$ttyv" = '/dev/ttyv*' ] && break vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1 done fi |