qubes-core 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. #
  3. # chkconfig: 345 90 90
  4. # description: Executes supplementary Qubes core scripts at VM boot
  5. #
  6. # Source function library.
  7. . /etc/rc.d/init.d/functions
  8. # Source Qubes library.
  9. . /usr/lib/qubes/init/functions
  10. start()
  11. {
  12. have_qubesdb || return
  13. # Start AppVM specific services
  14. for svc in cups ntpd ; do
  15. if qsvc $svc && test -e /etc/init.d/$svc ; then
  16. /sbin/service $svc start
  17. fi
  18. done
  19. echo -n $"Finagling printer icon:"
  20. /usr/lib/qubes/init/control-printer-icon.sh
  21. success
  22. echo
  23. if qsvc meminfo-writer ; then
  24. MEM_CHANGE_THRESHOLD_KB=30000
  25. MEMINFO_DELAY_USEC=100000
  26. echo -n $"Starting Qubes memory information service:"
  27. /usr/lib/qubes/meminfo-writer $MEM_CHANGE_THRESHOLD_KB $MEMINFO_DELAY_USEC /var/run/meminfo-writer.pid
  28. success
  29. echo ""
  30. fi
  31. echo -n $"Executing Qubes misc post scripts:"
  32. /usr/lib/qubes/init/misc-post.sh && success || failure
  33. echo
  34. }
  35. stop()
  36. {
  37. have_qubesdb || return
  38. /usr/lib/qubes/init/misc-post-stop.sh
  39. }
  40. case "$1" in
  41. start)
  42. start
  43. ;;
  44. stop)
  45. stop
  46. ;;
  47. *)
  48. echo $"Usage: $0 {start|stop}"
  49. exit 3
  50. ;;
  51. esac
  52. exit $RETVAL