summaryrefslogtreecommitdiff
path: root/byteback-setup-client-receive
diff options
context:
space:
mode:
authorMatthew Bloch <matthew@bytemark.co.uk>2014-12-04 18:35:36 +0000
committerMatthew Bloch <matthew@bytemark.co.uk>2014-12-04 18:35:36 +0000
commitfcf00ad61a60c9e99a7d45380803f0dbf0b858f5 (patch)
treeb819c65842ce37dbd80108464425e0c0779534c9 /byteback-setup-client-receive
parenta7162ddb80be70443d5617cac5d71ce6521e9f42 (diff)
Realised we don't need sudo at all to run our btrfs commands, removed all
references.
Diffstat (limited to 'byteback-setup-client-receive')
-rwxr-xr-xbyteback-setup-client-receive9
1 files changed, 3 insertions, 6 deletions
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")