From cab549c76c8822be2850f048a2f80d5a174f5910 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Wed, 1 Feb 2023 10:35:56 +0100 Subject: pkgbase: Create a FreeBSD-console-tools package And put in it: - kbdcontrol - vidcontrol - moused - kbdmap Those aren't useful in a jail or for a modern desktop. While here, split the devd.conf part into some new files. Reviewed by: bapt Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38321 --- libexec/rc/rc.d/Makefile | 6 +++-- release/packages/Makefile.package | 2 ++ sbin/devd/Makefile | 5 +++++ sbin/devd/devd.conf | 46 --------------------------------------- sbin/devd/moused.conf | 35 +++++++++++++++++++++++++++++ sbin/devd/syscons.conf | 9 ++++++++ usr.sbin/kbdcontrol/Makefile | 1 + usr.sbin/kbdmap/Makefile | 1 + usr.sbin/moused/Makefile | 1 + usr.sbin/vidcontrol/Makefile | 1 + 10 files changed, 59 insertions(+), 48 deletions(-) create mode 100644 sbin/devd/moused.conf create mode 100644 sbin/devd/syscons.conf diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 56ee41a8316d..e2019c60f196 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -252,8 +252,10 @@ JAILPACKAGE= jail .endif .if ${MK_LEGACY_CONSOLE} != "no" -CONFS+= moused -CONFS+= syscons +CONFGROUPS+= CONSOLE +CONSOLE+= moused +CONSOLE+= syscons +CONSOLEPACKAGE= console-tools .endif .if ${MK_LPR} != "no" diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 26e1f7e2a14d..47e0ee1c224b 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -30,6 +30,8 @@ clang_COMMENT= Clang Utilities clang_DESC= Clang Utilities clibs_COMMENT= Core C Libraries clibs_DESC= Core C Libraries +console-tools_COMMENT= Console Utilities +console-tools_DESC= Console Utilities csh_COMMENT= C Shell csh_DESC= C Shell ctf-tools_COMMENT= CTF Utilities diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile index 72c65caa3317..d3b910b2e9ec 100644 --- a/sbin/devd/Makefile +++ b/sbin/devd/Makefile @@ -22,6 +22,11 @@ POWERPROFILEDIR= ${DEVDDIR} POWERPROFILE+= power_profile.conf POWERPROFILEPACKAGE= acpi +CONFGROUPS+= CONSOLE +CONSOLEDIR= ${DEVDDIR} +CONSOLE+= moused.conf syscons.conf +CONSOLEPACKAGE= console-tools + .if ${MK_BLUETOOTH} != "no" CONFGROUPS+= BLUETOOTH BLUETOOTHDIR= ${DEVDDIR} diff --git a/sbin/devd/devd.conf b/sbin/devd/devd.conf index d30f97c7abb0..9604fe8efc05 100644 --- a/sbin/devd/devd.conf +++ b/sbin/devd/devd.conf @@ -76,52 +76,6 @@ detach 100 { # action "sleep 2 && /usr/sbin/ath3kfw -d $device-name -f /usr/local/etc/ath3k-1.fw"; #}; -# When a USB keyboard arrives, attach it as the console keyboard. -attach 100 { - device-name "ukbd0"; - action "service syscons setkeyboard /dev/ukbd0"; -}; -detach 100 { - device-name "ukbd0"; - action "service syscons setkeyboard /dev/kbd0"; -}; - -notify 100 { - match "system" "DEVFS"; - match "subsystem" "CDEV"; - match "type" "CREATE"; - match "cdev" "atp[0-9]+"; - - action "service moused quietstart $cdev"; -}; - -notify 100 { - match "system" "DEVFS"; - match "subsystem" "CDEV"; - match "type" "CREATE"; - match "cdev" "ums[0-9]+"; - - action "service moused quietstart $cdev"; -}; - -notify 100 { - match "system" "DEVFS"; - match "subsystem" "CDEV"; - match "type" "CREATE"; - match "cdev" "wsp[0-9]+"; - - action "service moused quietstart $cdev"; -}; - -notify 100 { - match "system" "DEVFS"; - match "subsystem" "CDEV"; - match "type" "DESTROY"; - match "cdev" "ums[0-9]+"; - - action "service moused stop $cdev"; -}; - # Don't even try to second guess what to do about drivers that don't # match here. Instead, pass it off to syslog. Commented out for the # moment, as the pnpinfo variable isn't set in devd yet. Individual diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf new file mode 100644 index 000000000000..002edad9a8a9 --- /dev/null +++ b/sbin/devd/moused.conf @@ -0,0 +1,35 @@ +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "atp[0-9]+"; + + action "service moused quietstart $cdev"; +}; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "ums[0-9]+"; + + action "service moused quietstart $cdev"; +}; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "CREATE"; + match "cdev" "wsp[0-9]+"; + + action "service moused quietstart $cdev"; +}; + +notify 100 { + match "system" "DEVFS"; + match "subsystem" "CDEV"; + match "type" "DESTROY"; + match "cdev" "ums[0-9]+"; + + action "service moused stop $cdev"; +}; diff --git a/sbin/devd/syscons.conf b/sbin/devd/syscons.conf new file mode 100644 index 000000000000..cd0c744955b9 --- /dev/null +++ b/sbin/devd/syscons.conf @@ -0,0 +1,9 @@ +# When a USB keyboard arrives, attach it as the console keyboard. +attach 100 { + device-name "ukbd0"; + action "service syscons setkeyboard /dev/ukbd0"; +}; +detach 100 { + device-name "ukbd0"; + action "service syscons setkeyboard /dev/kbd0"; +}; diff --git a/usr.sbin/kbdcontrol/Makefile b/usr.sbin/kbdcontrol/Makefile index 5a15ef3c9da6..960671a40fe7 100644 --- a/usr.sbin/kbdcontrol/Makefile +++ b/usr.sbin/kbdcontrol/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE= console-tools PROG= kbdcontrol MAN= kbdcontrol.1 kbdmap.5 MLINKS= kbdmap.5 keymap.5 diff --git a/usr.sbin/kbdmap/Makefile b/usr.sbin/kbdmap/Makefile index 22747e70720c..a4f3158aa167 100644 --- a/usr.sbin/kbdmap/Makefile +++ b/usr.sbin/kbdmap/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE= console-tools PROG= kbdmap CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib LIBADD= bsddialog diff --git a/usr.sbin/moused/Makefile b/usr.sbin/moused/Makefile index 0f9eac5b2417..e5d59e24be11 100644 --- a/usr.sbin/moused/Makefile +++ b/usr.sbin/moused/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE= console-tools PROG= moused MAN= moused.8 diff --git a/usr.sbin/vidcontrol/Makefile b/usr.sbin/vidcontrol/Makefile index 8c8f6bb804b2..a09b0733ba94 100644 --- a/usr.sbin/vidcontrol/Makefile +++ b/usr.sbin/vidcontrol/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +PACKAGE= console-tools PROG= vidcontrol SRCS= vidcontrol.c decode.c -- cgit v1.2.3