dsnap-sync: verify_snapper_structure bugfix

- test retuncode to btrfs subvolume creation call

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2018-12-21 19:16:06 +01:00
parent f8808e4520
commit 2bb342216a
2 changed files with 1 additions and 2 deletions

View File

@@ -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

View File

@@ -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