dom0: sync dom0 clock more frequent; start it from init.d script

This commit is contained in:
Marek Marczykowski 2011-09-15 14:43:02 +02:00
parent 633b21bb26
commit 9f14be6eed
4 changed files with 10 additions and 15 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
# 6h
UPDATES_SLEEP=21600
# 15m
UPDATES_SLEEP=900
UPDATES_VM=`qvm-get-updatevm`
QREXEC_CLIENT=/usr/lib/qubes/qrexec_client
@ -11,10 +11,12 @@ if [ -z "$UPDATES_VM" ]; then
exit 1
fi
if ! xl domid "$UPDATES_VM" > /dev/null 2>&1; then
echo "UpdateVM not started, exiting!"
exit 1
fi
echo "Waiting for UpdateVM to be started"
# Intentionally used xl domid here to check if domain is running (in case of
# eg. stale qrexec socket)
while ! [ -f /var/run/qubes/qrexec.`xl domid "$UPDATES_VM" 2>/dev/null` ]; do
sleep 1
done
(
# Allow only one instance

View File

@ -50,6 +50,8 @@ start()
MEMINFO_DELAY_USEC=100000
/usr/lib/qubes/meminfo-writer $MEM_CHANGE_THRESHOLD_KB $MEMINFO_DELAY_USEC &
/usr/lib/qubes/keep-dom0-clock-synced > /var/log/qubes/dom0-clock-sync.log 2>&1 &
touch /var/lock/subsys/qubes_core
success
echo

View File

@ -1,7 +0,0 @@
[Desktop Entry]
Name=Qubes Dom0 clock watch
Comment=Keeps dom0 clock synced with UpdateVM
Icon=qubes
Exec=/usr/lib/qubes/keep-dom0-clock-synced
Terminal=false
Type=Application

View File

@ -167,7 +167,6 @@ install -m 0440 qubes.sudoers $RPM_BUILD_ROOT/etc/sudoers.d/qubes
install -d $RPM_BUILD_ROOT/etc/xdg/autostart
install -m 0644 qubes-guid.desktop $RPM_BUILD_ROOT/etc/xdg/autostart/
install -m 0644 qubes-clock-watch.desktop $RPM_BUILD_ROOT/etc/xdg/autostart/
mkdir -p $RPM_BUILD_ROOT/etc/dracut.conf.d
cp dracut/dracut.conf.d/* $RPM_BUILD_ROOT/etc/dracut.conf.d/
@ -358,7 +357,6 @@ fi
/etc/yum.real.repos.d/qubes-cached.repo
/etc/sudoers.d/qubes
/etc/xdg/autostart/qubes-guid.desktop
/etc/xdg/autostart/qubes-clock-watch.desktop
/etc/security/limits.d/99-qubes.conf
%dir /etc/dracut.conf.d/*
%dir /usr/share/dracut/modules.d/