X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcommon;h=f611c19e55b22dffe4ee5f60cdeee3805819d889;hb=cc8c39a7a9d895a5662c73f225318d74995bec92;hp=a42c18ff9481be77fa36ec25a6904b416bc06450;hpb=883c05418a2987751597e906ec2c63b1f5425df6;p=dak.git diff --git a/config/debian/common b/config/debian/common index a42c18ff..f611c19e 100644 --- a/config/debian/common +++ b/config/debian/common @@ -3,11 +3,8 @@ # # Set $PROGRAM to a string to have it added to the output. function log () { - if [ -z "${PROGRAM}" ]; then - echo "$(date +"%b %d %H:%M:%S") $(hostname -s) [$$] $@" - else - echo "$(date +"%b %d %H:%M:%S") $(hostname -s) ${PROGRAM}[$$]: $@" - fi + local prefix=${PROGRAM:-} + echo "$(date +"%b %d %H:%M:%S") $(hostname -s) ${prefix}[$$]: $@" } # log the message using log() but then also send a mail