I have this script which checks for updates on my host system and on my jails:
Script is being executed as a cron job.
The script seems to be producing 'garbage' output like in the image.
Was this way in 10.1-RELEASE and 10.3-RELEASE. After updating to 11.0-RELEASE it was still there. Though not always. But most of the time. Garbage seems to be put in different places inside the e-mail I'm getting via cron output. It is not really random garbage because it always outputs my external hostname and IP-address. Anyone have an idea what is producing this kind of output?
See image below for sample of e-mail produced by script:
Code:
#!/usr/local/bin/bash
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin"
# Updaten en rapporteren Ports Tree host system:
portsnap cron update && {
echo -e "Packages te updaten voor host system:\n"
pkg version -l '<' || {
echo -e "Fout tijdens tonen te updaten packages.\n"
}
} || {
echo -e "Fout tijdens updaten Ports Tree van host system.\n"
}
# Updaten en rapporteren Ports Tree jails:
qjail update -P && {
for JID in $(jls | cut -f 2 -w | tail -n +2)
do
JAILHOST=$(jexec $JID hostname)
echo -e "Packages te updaten voor jail $JAILHOST ($JID):\n"
(jexec $JID pkg version -l '<') || {
echo -e "Fout tijdens tonen te updaten packages.\n"
}
done
} || {
echo -e "Fout tijdens updaten ports tree voor jails.\n"
}
Script is being executed as a cron job.
The script seems to be producing 'garbage' output like in the image.
Was this way in 10.1-RELEASE and 10.3-RELEASE. After updating to 11.0-RELEASE it was still there. Though not always. But most of the time. Garbage seems to be put in different places inside the e-mail I'm getting via cron output. It is not really random garbage because it always outputs my external hostname and IP-address. Anyone have an idea what is producing this kind of output?
See image below for sample of e-mail produced by script: