So I've looked into things and it seems when logging in (via ssh) and using PAM module, scripts are run within /etc/update-motd.d/. You can see this by manually running:
Code:
run-parts /etc/update-motd.d/
So the relevant part regarding the update notifier is within: /etc/update-motd.d/90-updates-available
When I manually run this file I'm greeted with:
Code:
#> /etc/update-motd.d/90-updates-available/
297 updates can be installed immediately.
167 of these updates are security updates.
To see these additional updates run: apt list --upgradable
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
Specifically looking at the script:
Code:
#!/bin/sh
stamp="/var/lib/update-notifier/updates-available"
[ ! -r "$stamp" ] || cat "$stamp"
find $stamp -newermt 'now-7 days' 2> /dev/null | grep -q -m 1 '.' || /usr/share/update-notifier/notify-updates-outdated
Specifically looking at this script the variable $stamp contains the following:
Code:
# cat /var/lib/update-notifier/updates-available
297 updates can be installed immediately.
167 of these updates are security updates.
To see these additional updates run: apt list --upgradable
So the find command isn't exactly what I'm expecting -- I'm not sure what the newermt switch does but I'm totally confused --- where is the actual process that actually checks if updates are available??? Everything I'm seeing is referencing a static file declaring the number of updates. I was hoping like an executable would be run upon ssh login that would check for updates to generate these numbers -- not just reference a static file that was run at some other time (???like when the VM was booted)???
Bookmarks