summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2018-01-27 15:51:48 +0100
committeranonym <anonym@riseup.net>2018-01-29 13:28:19 +0100
commitb0a3dff56b70232e4213dc3f808496987ce7dd74 (patch)
tree166822da5b3567d265183c3048c3a4204d943891
parent3219e94a2e409506e6497ba8242dab085b3e76e8 (diff)
Use VM.file_[append,overwrite} instead of execute("echo ... > ...") pattern.
-rw-r--r--features/step_definitions/additional_software_packages.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/features/step_definitions/additional_software_packages.rb b/features/step_definitions/additional_software_packages.rb
index 714e723..241d2d8 100644
--- a/features/step_definitions/additional_software_packages.rb
+++ b/features/step_definitions/additional_software_packages.rb
@@ -1,5 +1,8 @@
When /^I configure additional software packages to install "(.+?)"$/ do |package|
- $vm.execute("echo #{package} > /live/persistence/TailsData_unlocked/live-additional-software.conf")
+ $vm.file_overwrite(
+ '/live/persistence/TailsData_unlocked/live-additional-software.conf',
+ package + "\n"
+ )
end
# We have to save the non-onion APT sources in persistence, so that on
@@ -7,8 +10,14 @@ end
# indexes to install the package we want.
When /^I add non-onion APT sources to persistence$/ do
$vm.execute("install -d -m 755 /live/persistence/TailsData_unlocked/apt-sources.list.d")
- $vm.execute("echo '/etc/apt/sources.list.d source=apt-sources.list.d,link' >> /live/persistence/TailsData_unlocked/persistence.conf")
- $vm.execute("cat /etc/apt/sources.list /etc/apt/sources.list.d/* > /live/persistence/TailsData_unlocked/apt-sources.list.d/non-onion.list")
+ $vm.file_append(
+ '/live/persistence/TailsData_unlocked/persistence.conf',
+ "/etc/apt/sources.list.d source=apt-sources.list.d,link\n"
+ )
+ $vm.file_overwrite(
+ '/live/persistence/TailsData_unlocked/apt-sources.list.d/non-onion.list',
+ $vm.execute("cat /etc/apt/sources.list /etc/apt/sources.list.d/*").stdout
+ )
end
Then /^the additional software package installation service is run$/ do