WIP: Removes /var/log/evolinux/00_prepare_system.log
TODO: Workaround in special case when the server was never installed TODO: be sure that the final check with and logic is OK.
This commit is contained in:
parent
ffecb8a7c4
commit
956877442a
|
@ -522,7 +522,9 @@ if [ -e /etc/debian_version ]; then
|
||||||
|
|
||||||
# Check if no package has been upgraded since $limit.
|
# Check if no package has been upgraded since $limit.
|
||||||
if [ "$IS_NOTUPGRADED" = 1 ]; then
|
if [ "$IS_NOTUPGRADED" = 1 ]; then
|
||||||
|
if zgrep -hq upgrade /var/log/dpkg.log*; then
|
||||||
last_upgrade=$(date +%s -d $(zgrep -h upgrade /var/log/dpkg.log* |sort -n |tail -1 |cut -f1 -d ' '))
|
last_upgrade=$(date +%s -d $(zgrep -h upgrade /var/log/dpkg.log* |sort -n |tail -1 |cut -f1 -d ' '))
|
||||||
|
fi
|
||||||
if grep -q '^mailto="listupgrade-todo@' /etc/evolinux/listupgrade.cnf \
|
if grep -q '^mailto="listupgrade-todo@' /etc/evolinux/listupgrade.cnf \
|
||||||
|| grep -q -E '^[[:digit:]]+[[:space:]]+[[:digit:]]+[[:space:]]+[^\*]' /etc/cron.d/listupgrade; then
|
|| grep -q -E '^[[:digit:]]+[[:space:]]+[[:digit:]]+[[:space:]]+[^\*]' /etc/cron.d/listupgrade; then
|
||||||
# Manual upgrade process
|
# Manual upgrade process
|
||||||
|
@ -531,8 +533,8 @@ if [ -e /etc/debian_version ]; then
|
||||||
# Regular process
|
# Regular process
|
||||||
limit=$(date +%s -d "now - 90 days")
|
limit=$(date +%s -d "now - 90 days")
|
||||||
fi
|
fi
|
||||||
if [ -f /var/log/evolinux/00_prepare_system.log ]; then
|
if [ -d /var/log/installer ]; then
|
||||||
install_date=$(stat -c %Z /var/log/evolinux/00_prepare_system.log)
|
install_date=$(stat -c %Z /var/log/installer)
|
||||||
else
|
else
|
||||||
install_date=0
|
install_date=0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue