core-agent-linux/vm-init.d/qubes-core
2016-10-23 20:19:51 +00:00

63 lines
1.1 KiB
Bash
Executable File

#!/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