From 7a0022a0a5fa214892b29221a2fae904dbc5b856 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 21 Oct 2014 14:50:44 -0700 Subject: removed constants.rb, now defined in platform.rb --- lib/leap_cli/remote/leap_plugin.rb | 4 ++-- lib/leap_cli/remote/puppet_plugin.rb | 2 +- lib/leap_cli/remote/tasks.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/leap_cli/remote') diff --git a/lib/leap_cli/remote/leap_plugin.rb b/lib/leap_cli/remote/leap_plugin.rb index a284712..af88c2a 100644 --- a/lib/leap_cli/remote/leap_plugin.rb +++ b/lib/leap_cli/remote/leap_plugin.rb @@ -26,7 +26,7 @@ module LeapCli; module Remote; module LeapPlugin # def assert_initialized begin - test_initialized_file = "test -f #{INITIALIZED_FILE}" + test_initialized_file = "test -f #{Leap::Platform.init_path}" check_required_packages = "! dpkg-query -W --showformat='${Status}\n' #{required_packages} 2>&1 | grep -q -E '(deinstall|no packages)'" run "#{test_initialized_file} && #{check_required_packages} && echo ok" rescue Capistrano::CommandError => exc @@ -57,7 +57,7 @@ module LeapCli; module Remote; module LeapPlugin end def mark_initialized - run "touch #{INITIALIZED_FILE}" + run "touch #{Leap::Platform.init_path}" end # diff --git a/lib/leap_cli/remote/puppet_plugin.rb b/lib/leap_cli/remote/puppet_plugin.rb index 9c41380..e3f6be2 100644 --- a/lib/leap_cli/remote/puppet_plugin.rb +++ b/lib/leap_cli/remote/puppet_plugin.rb @@ -6,7 +6,7 @@ module LeapCli; module Remote; module PuppetPlugin def apply(options) - run "#{PUPPET_DESTINATION}/bin/puppet_command set_hostname apply #{flagize(options)}" + run "#{Leap::Platform.leap_dir}/bin/puppet_command set_hostname apply #{flagize(options)}" end private diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb index e66b0a8..7fd8d64 100644 --- a/lib/leap_cli/remote/tasks.rb +++ b/lib/leap_cli/remote/tasks.rb @@ -34,7 +34,7 @@ BAD_APT_GET_UPDATE = /(BADSIG|NO_PUBKEY|KEYEXPIRED|REVKEYSIG|NODATA)/ task :install_prerequisites, :max_hosts => MAX_HOSTS do apt_get = "DEBIAN_FRONTEND=noninteractive apt-get -q -y -o DPkg::Options::=--force-confold" - leap.mkdirs LeapCli::PUPPET_DESTINATION + leap.mkdirs Leap::Platform.leap_dir run "echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen" leap.log :updating, "package list" do run "apt-get update" do |channel, stream, data| -- cgit v1.2.3