ssh_filter_btrbk: fail if any command fails, or var is undefined

pull/44/head
Yaroslav Halchenko 2015-07-08 08:54:56 -04:00 committed by Axel Burri
parent 97286ab34c
commit f8c64c4f27
1 changed files with 5 additions and 1 deletions

6
ssh_filter_btrbk.sh Normal file → Executable file
View File

@ -1,8 +1,12 @@
#!/bin/sh
set -e
set -u
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
if [ "$1" = "-l" ]; then
enable_log=
if [ "$#" -ge 1 ] && [ "$1" = "-l" ]; then
enable_log=1
fi