From a59a321f55dac0343394a04006b47e543e95f7c1 Mon Sep 17 00:00:00 2001 From: guido Date: Wed, 30 Apr 2014 15:39:47 -0400 Subject: Install ntpd daemon if it's not present on debian. --- lib/leap_cli/remote/tasks.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb index 3c52162..249c107 100644 --- a/lib/leap_cli/remote/tasks.rb +++ b/lib/leap_cli/remote/tasks.rb @@ -38,12 +38,12 @@ task :install_prerequisites, :max_hosts => MAX_HOSTS do run "apt-get update" end leap.log :updating, "server time" do - run 'test -f /etc/init.d/ntp && /etc/init.d/ntp stop' + run "test -f /etc/init.d/ntp || #{apt_get} install ntp && /etc/init.d/ntp stop" run "test -f /usr/sbin/ntpdate || #{apt_get} install ntpdate" leap.log :running, "ntpdate..." do run "test -f /usr/sbin/ntpdate && ntpdate 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org" end - run 'test -f /etc/init.d/ntp && /etc/init.d/ntp start' + run "test -f /etc/init.d/ntp && /etc/init.d/ntp start" end leap.log :installing, "required packages" do run "#{apt_get} install #{leap.required_packages}" -- cgit v1.2.3