Merge pull request #10 from darko-poljak/output-backup-source
Add source name tag in log line
This commit is contained in:
commit
5c1bf8a8de
2 changed files with 4 additions and 7 deletions
10
ccollect
10
ccollect
|
@ -150,11 +150,6 @@ _is_interactive()
|
||||||
[ -t 0 -o -p /dev/stdin ]
|
[ -t 0 -o -p /dev/stdin ]
|
||||||
}
|
}
|
||||||
|
|
||||||
add_name()
|
|
||||||
{
|
|
||||||
awk "{ print \"[${name}] \" \$0 }"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ssh-"feature": we cannot do '... read ...; ssh ...; < file',
|
# ssh-"feature": we cannot do '... read ...; ssh ...; < file',
|
||||||
# because ssh reads stdin! -n does not work -> does not ask for password
|
# because ssh reads stdin! -n does not work -> does not ask for password
|
||||||
|
@ -252,6 +247,7 @@ _techo()
|
||||||
{
|
{
|
||||||
if [ "${LOGLEVEL}" = "a" ]
|
if [ "${LOGLEVEL}" = "a" ]
|
||||||
then
|
then
|
||||||
|
set -- ${name:+"[${name}]"} $@
|
||||||
"${_techof}" "$@"
|
"${_techof}" "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -530,7 +526,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
|
||||||
# Standard configuration checks
|
# Standard configuration checks
|
||||||
#
|
#
|
||||||
if [ ! -e "${backup}" ]; then
|
if [ ! -e "${backup}" ]; then
|
||||||
_exit_err "Source does not exist."
|
_exit_err "Source \"${backup}\" does not exist."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -811,7 +807,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
|
||||||
_techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)"
|
_techo "Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)"
|
||||||
|
|
||||||
unlock "${name}"
|
unlock "${name}"
|
||||||
) | add_name
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
* Add Windows(Cygwin) as supported OS
|
* Add Windows(Cygwin) as supported OS
|
||||||
|
* Add source name tag in log line
|
||||||
|
|
Loading…
Reference in a new issue