1. Ich habe mir ein Updatescript gebastelt um alle VEs auf meinem Server automatisch zu aktualisieren. Die Updates werden ausgeführt, allerdings bekomme ich immer eine Fehlermail wenn ein Update installiert wurde. Das Script sieht folgendermaßen aus:
Code: Alles auswählen
#!/bin/bash
RECIPIENT="root"
SUBJECT="VE-Update"
OUTPUTF=/var/log/$(date +%Y-%m-%d)_$(basename ${0}).log
for i in $(vzlist -o vpsid -H)
do
echo "Update VE: ${i} $(date)" >> ${OUTPUTF}
echo "----------------------------------------------------------------------------------------------------" >> ${OUTPUTF}
vzctl exec $i 'aptitude -y safe-upgrade' >> ${OUTPUTF}
echo "----------------------------------------------------------------------------------------------------" >> ${OUTPUTF}
done
mailx -s "${SUBJECT}" ${RECIPIENT} < ${OUTPUTF}
exit 0
Code: Alles auswählen
/etc/cron.daily/vzupdate:
dpkg-preconfigure: unable to re-open stdin:
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Code: Alles auswählen
The following packages will be upgraded:
libaprutil1
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 79.8kB of archives. After unpacking 32.8kB will be freed.
Writing extended state information...
Get:1 ftp://mirror.hetzner.de lenny/updates/main libaprutil1 1.2.12+dfsg-8+lenny2 [79.8kB]
Fetched 79.8kB in 1s (77.7kB/s)
(READING DATABASE ... 20560 FILES AND DIRECTORIES CURRENTLY INSTALLED.)
PREPARING TO REPLACE LIBAPRUTIL1 1.2.12+DFSG-8 (USING .../LIBAPRUTIL1_1.2.12+DFSG-8+LENNY2_AMD64.DEB) ...
UNPACKING REPLACEMENT LIBAPRUTIL1 ...
SETTING UP LIBAPRUTIL1 (1.2.12+DFSG-8+LENNY2) ...
Gruß Stephan