diff options
author | Matthew Bloch <matthew@bytemark.co.uk> | 2014-12-04 18:35:36 +0000 |
---|---|---|
committer | Matthew Bloch <matthew@bytemark.co.uk> | 2014-12-04 18:35:36 +0000 |
commit | fcf00ad61a60c9e99a7d45380803f0dbf0b858f5 (patch) | |
tree | b819c65842ce37dbd80108464425e0c0779534c9 /byteback-setup-client-receive | |
parent | a7162ddb80be70443d5617cac5d71ce6521e9f42 (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-x | byteback-setup-client-receive | 9 |
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") |