10-qubes-core-agent-features.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh
  2. # announce features supported by this template
  3. qvm-features-request qrexec=1
  4. qvm-features-request os=Linux
  5. if [ -x /usr/bin/qubes-gui ]; then
  6. qvm-features-request gui=1
  7. fi
  8. if systemctl -q is-enabled qubes-firewall.service 2>/dev/null; then
  9. qvm-features-request qubes-firewall=1
  10. else
  11. qvm-features-request qubes-firewall=0
  12. fi
  13. qvm-features-request supported-service.meminfo-writer=1
  14. # native services plugged into qubes-services with systemd drop-ins, list them
  15. # only when actual service is installed
  16. advertise_systemd_service() {
  17. qsrv=$1
  18. shift
  19. for unit in "$@"; do
  20. if systemctl -q is-enabled "$unit" 2>/dev/null; then
  21. qvm-features-request supported-service."$qsrv"=1
  22. fi
  23. done
  24. }
  25. advertise_systemd_service network-manager NetworkManager.service \
  26. network-manager.service
  27. advertise_systemd_service modem-manager ModemManager.service
  28. advertise_systemd_service avahi avahi-daemon.service
  29. advertise_systemd_service crond anacron.service cron.service crond.service
  30. advertise_systemd_service cups cups.service org.cups.cupsd.service
  31. advertise_systemd_service clocksync chronyd.service qubes-sync-time.service \
  32. systemd-timesyncd.service
  33. advertise_systemd_service exim4 exim4.service
  34. advertise_systemd_service getty@tty getty@tty.service
  35. advertise_systemd_service netfilter-persistent netfilter-persistent.service
  36. advertise_systemd_service qubes-update-check qubes-update-check.service
  37. advertise_systemd_service updates-proxy-setup qubes-updates-proxy-forwarder.socket
  38. advertise_systemd_service qubes-updates-proxy qubes-updates-proxy.service
  39. advertise_systemd_service qubes-firewall qubes-firewall.service
  40. advertise_systemd_service qubes-network qubes-network.service