Jump to content

Login Snipplet Updates available at Login


Ireng

Recommended Posts

Hi to All,

 

I recently upgraded my "test server" to the current version, by flashing a new image to my sd-card. However i forgot to recover some essential files, before flashing!

 

I liked very much the login info about the the number of available updates, since I used the testing repo at that time.

 

Could someone provide the code snipplet for that piece of info ann thell me, in which file to place it??

 

Well, many many thanks for your help and advice!

 

regards, ireng

Link to comment
Share on other sites

You might be talking about /etc/update-motd.d/40-updates? Please keep in mind that the information there might be outdated by 2 days since the count of available updates will be somehow cached since it migth delay any login attempt otherwise.

 

https://github.com/igorpecovnik/lib/blob/master/scripts/update-motd.d/40-updates#L139

 

So in case you really believe this is valuable 'information' then think about adjusting the script so that it updates /var/cache/apt/archives/updates.number anyway and call it from cron hourly or in case you love ultra slow logins modify the twodays_ago formula to your needs.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines