From 54849eb03280b7c859905b3ca190fce3b931e631 Mon Sep 17 00:00:00 2001 From: Matthew Bloch Date: Thu, 4 Dec 2014 18:39:47 +0000 Subject: Replaced pathless btrfs invocation with /sbin/btrfs (as we're no longer root). --- byteback-prune | 2 +- byteback-setup-client-receive | 2 +- lib/byteback/backup_directory.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/byteback-prune b/byteback-prune index 7d8d495..7e3e83e 100755 --- a/byteback-prune +++ b/byteback-prune @@ -127,4 +127,4 @@ if snapshots.empty? end info("Deleting #{snapshots.last.path}") -log_system("btrfs subvolume delete #{snapshots.last.path}") +log_system("/sbin/btrfs subvolume delete #{snapshots.last.path}") diff --git a/byteback-setup-client-receive b/byteback-setup-client-receive index 72e5471..0dc850f 100755 --- a/byteback-setup-client-receive +++ b/byteback-setup-client-receive @@ -30,7 +30,7 @@ Dir.chdir(ENV['HOME']) # don't know why we wouldn't be here FileUtils.mkdir_p(@hostname) error("Couldn't create btrfs subvolume") unless - system("btrfs subvolume create #{@hostname}/current") + system("/sbin/btrfs subvolume create #{@hostname}/current") FileUtils.mkdir_p(".ssh") diff --git a/lib/byteback/backup_directory.rb b/lib/byteback/backup_directory.rb index fc11840..6404cd8 100644 --- a/lib/byteback/backup_directory.rb +++ b/lib/byteback/backup_directory.rb @@ -53,11 +53,11 @@ module Byteback end def create!(from) - system_no_error("btrfs subvolume snapshot #{from} #{path}") + system_no_error("/sbin/btrfs subvolume snapshot #{from} #{path}") end def delete! - system_no_error("btrfs subvolume delete #{path}") + system_no_error("/sbin/btrfs subvolume delete #{path}") end # Returns the size of the given snapshot (runs du, may be slow) -- cgit v1.2.3