The backticks would cause the output of the zfs commands
to be evaluated as input for the if construct rather than
their exit status.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
while IFS= read -r -d $'\n' dev; do
mdev=$(echo "$dev" | awk '{ print $1; }')
echo -n "mounting $mdev..."
- if `zfs mount $mdev`; then
+ if zfs mount $mdev; then
echo -e "done";
else
echo -e "failed";
while IFS= read -r -d $'\n' dev; do
mdev=$(echo "$dev" | awk '{ print $1 }');
echo -n "umounting $mdev...";
- if `zfs umount $mdev`; then
+ if zfs umount $mdev; then
echo -e "done";
else
echo -e "failed";