Comment 9 for bug 692355

Steve Langasek (vorlon) wrote :

Looks like the bug is here in /usr/lib/update-notifier/update-motd-fsck-at-reboot:

# check time when we did the last check
stamp="/var/lib/update-notifier/fsck-at-reboot"
if [ -e "$stamp" ]; then
    stampt=$(stat -c %Y $stamp)
else
    stampt=0
fi

now=$(date +%s)
if [ $(($stampt + 3600)) -lt $now ] || [ $stampt -gt $now ]; then
    #echo $stampt $now need update
        NEEDS_FSCK_CHECK=yes
fi

If you log in on console triggering a refresh of the file, then reboot and get the fsck, then log in again once the system finishes booting, there will be a current stamp file and the check will not be re-run.

We should probably compare the file's timestamp with the uptime, and set NEEDS_FSCK_CHECK=yes if it's older than the last reboot.