1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #!/bin/bash
- #
- # chkconfig: 345 90 90
- # description: Executes supplementary Qubes core scripts at VM boot
- #
- # Source function library.
- . /etc/rc.d/init.d/functions
- # Source Qubes library.
- . /usr/lib/qubes/init/functions
- start()
- {
- have_qubesdb || return
- # Start AppVM specific services
- for svc in cups ntpd ; do
- if qsvc $svc && test -e /etc/init.d/$svc ; then
- /sbin/service $svc start
- fi
- done
- echo -n $"Finagling printer icon:"
- /usr/lib/qubes/init/control-printer-icon.sh
- success
- echo
- if qsvc meminfo-writer ; then
- MEM_CHANGE_THRESHOLD_KB=30000
- MEMINFO_DELAY_USEC=100000
- echo -n $"Starting Qubes memory information service:"
- /usr/lib/qubes/meminfo-writer $MEM_CHANGE_THRESHOLD_KB $MEMINFO_DELAY_USEC /var/run/meminfo-writer.pid
- success
- echo ""
- fi
- echo -n $"Executing Qubes misc post scripts:"
- /usr/lib/qubes/init/misc-post.sh && success || failure
- echo
- }
- stop()
- {
- have_qubesdb || return
- /usr/lib/qubes/init/misc-post-stop.sh
- }
- case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- *)
- echo $"Usage: $0 {start|stop}"
- exit 3
- ;;
- esac
- exit $RETVAL
|