summaryrefslogtreecommitdiff
path: root/vendor/supply_drop
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-04 01:20:32 -0800
committerelijah <elijah@riseup.net>2012-11-04 01:20:32 -0800
commit05f4f6944e8b44ea92eaf55c7368261478ee41ea (patch)
treeb29f9d8c7dd1a4fd51e37565191193c0ca7b0729 /vendor/supply_drop
parent38151e6b250e0455a02d9601fadbf6206df34430 (diff)
remove sudo calls
Diffstat (limited to 'vendor/supply_drop')
-rw-r--r--vendor/supply_drop/lib/supply_drop/plugin.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/supply_drop/lib/supply_drop/plugin.rb b/vendor/supply_drop/lib/supply_drop/plugin.rb
index 348b22b..1784d59 100644
--- a/vendor/supply_drop/lib/supply_drop/plugin.rb
+++ b/vendor/supply_drop/lib/supply_drop/plugin.rb
@@ -20,8 +20,8 @@ module SupplyDrop
end
def prepare
- run "mkdir -p #{puppet_destination}"
- run "#{sudo} chown -R $USER: #{puppet_destination}"
+ #run "mkdir -p #{puppet_destination}"
+ #run "#{sudo} chown -R $USER: #{puppet_destination}"
end
def noop
@@ -34,7 +34,7 @@ module SupplyDrop
def lock
if should_lock?
- run <<-GETLOCK
+ cmd = <<-GETLOCK
if [ ! -f #{puppet_lock_file} ]; then
touch #{puppet_lock_file};
else
@@ -42,11 +42,12 @@ else
exit 1;
fi
GETLOCK
+ run cmd.gsub(/\s+/, ' ')
end
end
def unlock
- run "#{sudo} rm -f #{puppet_lock_file}; true" if should_lock?
+ run "rm -f #{puppet_lock_file}; true" if should_lock?
end
private