update-motd: use a marker file to hide esm updates information
Instead of a flag passed to the script, check for the existence of a
marker file coming from the Pro Client. This implements the same control
level for both tools.
Commit 12c4155458 ("reboot: restore reboot required notification") does
not restore the translations for the reboot notification, because the
reverted commit is not the one that removed them.
Restore the translations using ee490e5f3b because it is the last commit
that made real changes to the reboot notification translations. In
particular, restore the translations using the following:
$ for f in $(ls -1 po/*.po); do git show ee490e5f3b:$f | awk -v RS='' -v ORS='\n\n' '/reboot\.c/' >> $f; done
$ for f in $(ls -1 po/*.po); do git show ee490e5f3b:$f | awk -v RS='' -v ORS='\n\n' '/reboot-dialog\.ui/' >> $f; done
Then, update translations to fixup the formatting.
reboot: wait 3 hours since last /var/lib/dpkg/info update
Do not show the reboot notification until 3 hours have passed since the
last update to /var/lib/dpkg/info/. Accomplish this by adding
dpkg_info_time_since_update() and dpkg_info_updated() helper
functions. Monitor /var/lib/dpkg/info in monitor_cb to determine when
the directory or a file within it are updated.