Just enabled hotplugd(8) to handle a single device I'm interested in and
saw it basically duplicating kernel de/attach messages in
/var/log/daemon:
Dec 1 23:36:27 eru hotplugd[26475]: started
Dec 1 23:36:27 eru hotplugd[26475]: uhidev4 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: wskbd3 attached, class 5
Dec 1 23:36:27 eru hotplugd[26475]: ucc0 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhid0 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhidev5 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: ugen1 detached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: sd2 attached, class 2
Dec 1 23:36:27 eru hotplugd[26475]: scsibus4 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: umass0 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: audio1 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uaudio0 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: wskbd4 attached, class 5
Dec 1 23:36:27 eru hotplugd[26475]: ucc1 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhid1 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhid2 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhid3 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhid4 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhid5 attached, class 0
Dec 1 23:36:27 eru hotplugd[26475]: uhid6 attached, class 0
That's really what dmesg and/or /var/log/messages already tell me.
If I'm really interested in the class id (which is pretty obvious in
most -if not all- cases), I can add a logger(1) line to the hotplugd
`attach'/`detach' scripts and print my own info.
I consider this noise/spam, especially as default behaviour.
There is no option for verbose/quiet operation, but I also don't think
it is warranted.
Remove the unhelpful logging and keep the noise down.
Feedback? Objections? OK?
Index: hotplugd.c
===================================================================
RCS file: /cvs/src/usr.sbin/hotplugd/hotplugd.c,v
retrieving revision 1.17
diff -u -p -r1.17 hotplugd.c
--- hotplugd.c 12 Jul 2021 15:09:21 -0000 1.17
+++ hotplugd.c 1 Dec 2021 22:41:30 -0000
@@ -120,14 +120,10 @@ main(int argc, char *argv[])
switch (he.he_type) {
case HOTPLUG_DEVAT:
- syslog(LOG_INFO, "%s attached, class %d",
- he.he_devname, he.he_devclass);
exec_script(_PATH_ETC_HOTPLUG_ATTACH, he.he_devclass,
he.he_devname);
break;
case HOTPLUG_DEVDT:
- syslog(LOG_INFO, "%s detached, class %d",
- he.he_devname, he.he_devclass);
exec_script(_PATH_ETC_HOTPLUG_DETACH, he.he_devclass,
he.he_devname);
break;