Suppress usbguard startup unless a USB controller is visible to lspci

This commit is contained in:
Aaron Rainbolt 2025-11-07 17:09:22 -06:00
parent 5b97e7bd27
commit fa32ba6c4f
No known key found for this signature in database
GPG key ID: A709160D73C79109
3 changed files with 13 additions and 0 deletions

View file

@ -3,3 +3,4 @@
[Unit]
ConditionPathExists=/sys/bus/usb
ExecCondition=/usr/libexec/security-misc/check-for-usb-controller

View file

@ -0,0 +1,11 @@
#!/bin/bash
## Copyright (C) 2025 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
export LC_ALL='C'
if lspci | grep -q '^[^ ]* USB controller: '; then
exit 0
fi
exit 1