summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorguido <guido@bruo.org>2014-05-02 13:25:43 -0400
committerguido <guido@bruo.org>2014-05-02 13:25:43 -0400
commit7bac015e93ecc6570b0bed3ec617fb407c162ccb (patch)
tree18ff42b461f1ea1127cfa694a45d08c2e45fda3d /lib
parenta59a321f55dac0343394a04006b47e543e95f7c1 (diff)
stop/restart ntpd if present to change server time (fix bug #5599)
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/remote/tasks.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb
index 249c107..0a12a95 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 || #{apt_get} install ntp && /etc/init.d/ntp stop"
+ run "( test -f /etc/init.d/ntp && /etc/init.d/ntp stop ) || true"
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 ) || true"
end
leap.log :installing, "required packages" do
run "#{apt_get} install #{leap.required_packages}"