From 25f3947c16b57a9686500534e44423aab90b0bc7 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 9 Nov 2016 09:30:12 +0000 Subject: First pass at fixing btrfs path This replaces the call to /sbin/btrfs with a method to find a btrfs program, which raises ENOENT if one cannot be found. --- bin/byteback-prune | 2 +- bin/byteback-restore | 2 +- bin/byteback-setup-client-receive | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/byteback-prune b/bin/byteback-prune index a91d003..a0cd0fb 100755 --- a/bin/byteback-prune +++ b/bin/byteback-prune @@ -147,4 +147,4 @@ if snapshots.empty? end info("Deleting #{snapshots.last.path}") -log_system("/sbin/btrfs subvolume delete #{snapshots.last.path}") +log_system("#{btrfs_bin} subvolume delete #{snapshots.last.path}") diff --git a/bin/byteback-restore b/bin/byteback-restore index 94babf8..2cd54c5 100755 --- a/bin/byteback-restore +++ b/bin/byteback-restore @@ -81,7 +81,7 @@ def restore_files(paths, snapshot, all) end args << "." - puts args.join(" " ) if @verbose + puts args.join(" ") if @verbose system(*args) end diff --git a/bin/byteback-setup-client-receive b/bin/byteback-setup-client-receive index 3673b6a..528ccc9 100755 --- a/bin/byteback-setup-client-receive +++ b/bin/byteback-setup-client-receive @@ -32,7 +32,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("/sbin/btrfs subvolume create #{@hostname}/current") + system("#{btrfs_bin} subvolume create #{@hostname}/current") FileUtils.mkdir_p('.ssh') -- cgit v1.2.1