Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Login Snipplet Updates available at Login

Featured Replies

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

Solved by tkaiser

  • Solution

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.

  • Author

@tkaiser: Thanks for your reply and avice!

That is what I was looking for!

 

regards, Ireng

Guest
This topic is now closed to further replies.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.