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

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