Woher kommt die Meldung „0 Pakete können aktualisiert werden.“?

Woher kommt die Meldung „0 Pakete können aktualisiert werden.“?

Woher 0 packages can be updated.kommt der Login-Prozess?

Antwort1

Diese Nachrichten kommen von update-motd.

Das /etc/update-motd.d/updates-availableSkript generiert diese spezifische Ausgabe auscat /var/lib/update-notifier/updates-available

Antwort2

Um die Frage, woher all die MOTD-Meldungen kommen, zu beantworten, sehen Sie sich zunächst die PAM-Konfigurationen an.

 % grep -C1 motd /etc/pam.d/*
 /etc/pam.d/sshd:session optional pam_motd.so motd=/run/motd.dynamic

Sehen Sie nach, was pam_motd.so ausführt.

 % strings /lib/x86_64-linux-gnu/security/pam_motd.so
 run-parts /etc/update-motd.d > /run/motd.dynamic.new

„run-parts“ führt alle Skripte der Reihe nach in einem Verzeichnis aus.

 % ls /etc/update-motd.d/
 00-header*     80-esm*  91-release-upgrade*  98-reboot-required*
 10-help-text*  80-livepatch*          95-hwe-eol*
 50-motd-news*  90-updates-available*  98-fsck-at-reboot*

Hilfsskripte befinden sich in /usr/lib/update-notifier/update-motd*

 /usr/lib/update-notifier/update-motd-fsck-at-reboot*
 /usr/lib/update-notifier/update-motd-hwe-eol*
 /usr/lib/update-notifier/update-motd-reboot-required*
 /usr/lib/update-notifier/update-motd-updates-available*

Datendateien befinden sich in /var/lib/update-notifier

 dpkg-run-stamp  hwe-eol                  updates-available
 fsck-at-reboot  package-data-downloads/  user.d/

Um die MOTD-Informationen über die Befehlszeile auszugeben, entweder

$ ssh localhost

oder

# run-parts /etc/update-motd.d

verwandte Informationen