Affected versions: FreeBSD 12

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

USB/network hotplug automation scripts do not execute, requiring manual intervention.

Environment & Reproduction

Happens after custom devd.conf edits or permissions changes.

service devd status
cat /etc/devd.conf
service devd restart

Root Cause Analysis

Malformed devd rule syntax or wrong match criteria prevents event action execution.

Quick Triage

Check daemon health and recent event stream output.

service devd onestatus
pgrep devd
tail -n 80 /var/log/messages

Step-by-Step Diagnosis

Run devd in debug mode and verify rule matching during device attach.

service devd stop
/usr/sbin/devd -d -f /etc/devd.conf
dmesg | tail -n 60
Illustrative mockup for freebsd-12 — terminal_or_shell
devd ruleset and event trace diagnostics — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Correct rule syntax and restart devd with validated config.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

cp -a /etc/devd.conf /etc/devd.conf.bak
vi /etc/devd.conf
service devd start
Illustrative mockup for freebsd-12 — logs_or_journal
verified devd action execution after rule fix — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Move custom actions to dedicated include file under /usr/local/etc/devd for cleaner upgrades.

mkdir -p /usr/local/etc/devd
cat > /usr/local/etc/devd/custom.conf <<'EOF'
# custom rules
EOF

Verification & Acceptance Criteria

Hotplug event triggers expected command and logs confirm handler execution.

tail -f /var/log/messages
service devd restart

Rollback Plan

Restore prior devd.conf if new rule set suppresses other event handlers.

cp -a /etc/devd.conf.bak /etc/devd.conf
service devd restart

Prevention & Hardening

Lint custom devd rules and test with controlled hardware events.

service devd onestatus
cksum /etc/devd.conf

Related to rc.d service ordering issues and permission errors in invoked scripts.

Related tutorial: View the step-by-step tutorial for FreeBSD 12.

View all FreeBSD 12 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

FreeBSD devd daemon and event rule documentation.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.