Wrap snapraid-btrfs
to act as a drop-in replacement
for snapraid
.
Call snapraid-btrfs-wrapper
the same as you would snapraid-btrfs
or
snapraid
. All arguments will be passed to the appropriate program depending
on the command provided.
# Calls `snapraid-btrfs`
snapraid-btrfs-wrapper sync
# Calls `snapraid`
snapraid-btrfs-wrapper smart
This is a thin wrapper around snapraid-btrfs
(and snapraid
)
to act as a drop-in replacement for snapraid
.
snapraid-btrfs
provides custom functionality for a subset of the commands
provided by snapraid
, but does not pass through the remaining commands. This
wrapper solves that problem by passing commands known to be implemented by
snapraid-btrfs to snapraid-btrfs, and passing all other commands to snapraid.
It is clearly a design decision that snapraid-btrfs
does not pass through
unimplemented commands to snapraid
. The author of this script did not want to
have to remember which commands should be used by which programs, and thus
snapraid-btrfs-wrapper
was born.