`savelog' comes from the `debianutils' package and so is unlikely to
be available elsewhere. Revert to the old behaviour of clobbering the
logs in this case.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Robert Ho <robert.hu@intel.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
with_logging() {
local log=$1; shift
ensure_logs
- savelog -c 300 -n "$log" >/dev/null
+ if command -v savelog >/dev/null ; then
+ savelog -c 300 -n "$log" >/dev/null
+ fi
"$@" 2>&1 | tee "$log"
rc=${PIPESTATUS[0]}
if [ $rc -ne 0 ] ; then