From 2bb342216a4915e21e571d3a36f55bdd8971dcb2 Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Fri, 21 Dec 2018 19:16:06 +0100 Subject: [PATCH] dsnap-sync: verify_snapper_structure bugfix - test retuncode to btrfs subvolume creation call Signed-off-by: Ralf Zerres --- bin/dsnap-sync | 2 +- bin/tape-admin | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/dsnap-sync b/bin/dsnap-sync index 7065a6c..62b09c2 100755 --- a/bin/dsnap-sync +++ b/bin/dsnap-sync @@ -2916,7 +2916,7 @@ verify_snapper_structure () { # create the non existing remote BTRFS subvolume for given config cmd="$ssh btrfs subvolume create $backup_root 1>/dev/null" ret=$(eval $cmd) - if [ $ret -eq 1 ]; then + if [ $? -ne 0 ]; then printf "${RED}Error: ${MAGENTA}Creation of BTRFS subvolume (backup-root) ${GREEN}%s:%s${MAGENTA} failed.${NO_COLOR}\n" \ "$remote_host" "$backup_root" return 1 diff --git a/bin/tape-admin b/bin/tape-admin index 71083a5..43392c8 100755 --- a/bin/tape-admin +++ b/bin/tape-admin @@ -605,7 +605,6 @@ ltfs_mount () { if [ $verbose -ge 1 ]; then printf "${BLUE}ltfs_mount...${NO_COLOR}\n" fi - ltfs_is_mounted if [ $? -eq 1 ]; then if [ ! -d $ltfs_mountpoint ]; then