Don't skip source disk use report when INCLIST unconfigured
This commit is contained in:
parent
c12bca41e0
commit
6ccf6917e4
1 changed files with 18 additions and 8 deletions
|
|
@ -366,19 +366,29 @@ get_source_file_size()
|
||||||
*)
|
*)
|
||||||
DUEXCFLAG="--exclude-from=-"
|
DUEXCFLAG="--exclude-from=-"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for exclude in ${EXCLIST[@]}; do
|
for exclude in ${EXCLIST[@]}; do
|
||||||
DUEXCLIST="${DUEXCLIST}${exclude}\n"
|
DUEXCLIST="${DUEXCLIST}${exclude}\n"
|
||||||
done
|
done
|
||||||
|
|
||||||
for include in ${INCLIST[@]}
|
# if $INCLIST non zero then itterate through it for df readings, else just df $ROOT
|
||||||
do
|
# in both cases consider the excluded directories
|
||||||
echo -e '"'$DUEXCLIST'"' | \
|
if [ ! -z "$INCLIST" ]; then
|
||||||
du -hs ${DUEXCFLAG} ${include} | \
|
for include in ${INCLIST[@]}
|
||||||
awk '{ FS="\t"; $0=$0; print $1"\t"$2 }' \
|
do
|
||||||
>> ${LOGFILE}
|
echo -e '"'$DUEXCLIST'"' | \
|
||||||
done
|
du -hs ${DUEXCFLAG} ${include} | \
|
||||||
|
awk '{ FS="\t"; $0=$0; print $1"\t"$2 }' \
|
||||||
|
>> ${LOGFILE}
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo -e '"'$DUEXCLIST'"' | \
|
||||||
|
du -hs ${DUEXCFLAG} $ROOT | \
|
||||||
|
awk '{ FS="\t"; $0=$0; print $1"\t"$2 }' \
|
||||||
|
>> ${LOGFILE}
|
||||||
|
fi
|
||||||
|
|
||||||
echo >> ${LOGFILE}
|
echo >> ${LOGFILE}
|
||||||
|
|
||||||
# Restore IFS
|
# Restore IFS
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue