aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2023-02-01 09:35:56 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2023-02-08 07:52:40 +0000
commitcab549c76c8822be2850f048a2f80d5a174f5910 (patch)
tree9942eef244eda35e32358b466ec307ff7b122e2f
parent2878e21ff11b373d39fa98a77f215c61027337ee (diff)
downloadsrc-cab549c76c8822be2850f048a2f80d5a174f5910.tar.gz
src-cab549c76c8822be2850f048a2f80d5a174f5910.zip
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
-rw-r--r--libexec/rc/rc.d/Makefile6
-rw-r--r--release/packages/Makefile.package2
-rw-r--r--sbin/devd/Makefile5
-rw-r--r--sbin/devd/devd.conf46
-rw-r--r--sbin/devd/moused.conf35
-rw-r--r--sbin/devd/syscons.conf9
-rw-r--r--usr.sbin/kbdcontrol/Makefile1
-rw-r--r--usr.sbin/kbdmap/Makefile1
-rw-r--r--usr.sbin/moused/Makefile1
-rw-r--r--usr.sbin/vidcontrol/Makefile1
10 files changed, 59 insertions, 48 deletions
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