From fcf00ad61a60c9e99a7d45380803f0dbf0b858f5 Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Thu, 4 Dec 2014 18:35:36 +0000 Subject: Realised we don't need sudo at all to run our btrfs commands, removed all references. --- byteback-setup-client-receive | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'byteback-setup-client-receive') diff --git a/byteback-setup-client-receive b/byteback-setup-client-receive index d98eab2..72e5471 100755 --- a/byteback-setup-client-receive +++ b/byteback-setup-client-receive @@ -27,13 +27,10 @@ error("You must call this from byteback-setup-client on remote host") unless Dir.chdir(ENV['HOME']) # don't know why we wouldn't be here -Dir.mkdir(@hostname) +FileUtils.mkdir_p(@hostname) -error("Couldn't create btrfs subvolume (needs sudo)") unless - system("sudo btrfs subvolume create #{@hostname}/current") - -error("Couldn't set ownership of new subvolume (need sudo)") unless - system("sudo chown byteback "+File.expand_path("#{@hostname}/current")) +error("Couldn't create btrfs subvolume") unless + system("btrfs subvolume create #{@hostname}/current") FileUtils.mkdir_p(".ssh") -- cgit v1.2.3