「0個のパッケージを更新できます」はどこから来ますか?


回答:


22

これらのメッセージはから来ていupdate-motdます。

/etc/update-motd.d/updates-availableスクリプトはから、この特定の出力を生成し、cat /var/lib/update-notifier/updates-available


0

すべてのMOTDメッセージの送信元の答えとして、最初にPAM構成を確認します。

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

pam_motd.soの実行内容を確認してください。

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

「run-parts」は、ディレクトリ内のすべてのスクリプトを順番に実行します。

 % 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*

ヘルパースクリプトは/ 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*

データファイルは/ var / lib / update-notifierにあります

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

コマンドラインからMOTD情報を出力するには、次のいずれか

$ ssh localhost

または

# run-parts /etc/update-motd.d
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.