vm: RPC service for NTP time sync (#603)

This commit is contained in:
Marek Marczykowski 2012-06-22 21:59:15 +02:00
parent a952fc503d
commit 1fdaa847c4
3 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1 @@
/usr/lib/qubes/sync-ntp-clock

12
qubes_rpc/sync-ntp-clock Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
if [ -x /usr/libexec/ntpdate-wrapper ]; then
/usr/libexec/ntpdate-wrapper
elif [ -x /etc/init.d/ntpdate ]; then
/etc/init.d/ntpdate restart
elif [ -x /usr/sbin/ntpdate ]; then
/usr/sbin/ntpdate pool.ntp.org
else
echo "No ntpdate installed, giving up."
exit 1
fi

View File

@ -38,6 +38,7 @@ Requires: NetworkManager >= 0.8.1-1
Requires: /usr/bin/mimeopen Requires: /usr/bin/mimeopen
Requires: ethtool Requires: ethtool
Requires: tinyproxy Requires: tinyproxy
Requires: ntpdate
Provides: qubes-core-vm Provides: qubes-core-vm
Obsoletes: qubes-core-commonvm Obsoletes: qubes-core-commonvm
Obsoletes: qubes-core-appvm Obsoletes: qubes-core-appvm
@ -149,10 +150,11 @@ install qubes_rpc/qvm-copy-to-vm.kde $RPM_BUILD_ROOT/usr/lib/qubes
install qubes_rpc/qvm-copy-to-vm.gnome $RPM_BUILD_ROOT/usr/lib/qubes install qubes_rpc/qvm-copy-to-vm.gnome $RPM_BUILD_ROOT/usr/lib/qubes
install qubes_rpc/{vm-file-editor,qfile-agent,qopen-in-vm,qfile-unpacker} $RPM_BUILD_ROOT/usr/lib/qubes install qubes_rpc/{vm-file-editor,qfile-agent,qopen-in-vm,qfile-unpacker} $RPM_BUILD_ROOT/usr/lib/qubes
install qubes_rpc/{vm-shell,qrun-in-vm} $RPM_BUILD_ROOT/usr/lib/qubes install qubes_rpc/{vm-shell,qrun-in-vm} $RPM_BUILD_ROOT/usr/lib/qubes
install qubes_rpc/sync-ntp-clock $RPM_BUILD_ROOT/usr/lib/qubes
install -d $RPM_BUILD_ROOT/%{kde_service_dir} install -d $RPM_BUILD_ROOT/%{kde_service_dir}
install -m 0644 qubes_rpc/{qvm-copy.desktop,qvm-dvm.desktop} $RPM_BUILD_ROOT/%{kde_service_dir} install -m 0644 qubes_rpc/{qvm-copy.desktop,qvm-dvm.desktop} $RPM_BUILD_ROOT/%{kde_service_dir}
install -d $RPM_BUILD_ROOT/etc/qubes_rpc install -d $RPM_BUILD_ROOT/etc/qubes_rpc
install -m 0644 qubes_rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell} $RPM_BUILD_ROOT/etc/qubes_rpc install -m 0644 qubes_rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell,qubes.SyncNtpClock} $RPM_BUILD_ROOT/etc/qubes_rpc
install qrexec/qrexec_agent $RPM_BUILD_ROOT/usr/lib/qubes install qrexec/qrexec_agent $RPM_BUILD_ROOT/usr/lib/qubes
install qrexec/qrexec_client_vm $RPM_BUILD_ROOT/usr/lib/qubes install qrexec/qrexec_client_vm $RPM_BUILD_ROOT/usr/lib/qubes
@ -352,6 +354,7 @@ rm -rf $RPM_BUILD_ROOT
/etc/qubes_rpc/qubes.Filecopy /etc/qubes_rpc/qubes.Filecopy
/etc/qubes_rpc/qubes.OpenInVM /etc/qubes_rpc/qubes.OpenInVM
/etc/qubes_rpc/qubes.VMShell /etc/qubes_rpc/qubes.VMShell
/etc/qubes_rpc/qubes.SyncNtpClock
/etc/sudoers.d/qubes /etc/sudoers.d/qubes
/etc/sysconfig/iptables /etc/sysconfig/iptables
/etc/sysconfig/modules/qubes_core.modules /etc/sysconfig/modules/qubes_core.modules
@ -375,6 +378,7 @@ rm -rf $RPM_BUILD_ROOT
/usr/lib/qubes/block_add_change /usr/lib/qubes/block_add_change
/usr/lib/qubes/block_cleanup /usr/lib/qubes/block_cleanup
/usr/lib/qubes/block_remove /usr/lib/qubes/block_remove
/usr/lib/qubes/sync-ntp-clock
/usr/lib/qubes/meminfo-writer /usr/lib/qubes/meminfo-writer
/usr/lib/qubes/network-manager-prepare-conf-dir /usr/lib/qubes/network-manager-prepare-conf-dir
/usr/lib/qubes/qfile-agent /usr/lib/qubes/qfile-agent