Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
songjiaxin2008
V2EX  ›  Linux

DO 的更新提示是怎么做到的?

  •  
  •   songjiaxin2008 ·
    solarhell · Feb 18, 2016 · 4168 views
    This topic created in 3771 days ago, the information mentioned may be changed or developed.
    研究了一下,只发现了修改开机文字提示的东西,实在是 google 不到了,希望有大神能够解答:)
    6 replies    2016-02-20 15:20:50 +08:00
    MaiCong
        1
    MaiCong  
       Feb 18, 2016 via iPhone
    开机启动脚本
    Showfom
        2
    Showfom  
    PRO
       Feb 18, 2016
    默认就有的
    SpicyCat
        3
    SpicyCat  
       Feb 18, 2016
    这是 ubuntu 带的, 并不是 DO 的功能。
    /usr/lib/update-notifier/apt-check --human-readable
    holyzhou
        4
    holyzhou  
       Feb 18, 2016
    当登录时触发 pam 的 login 配置(/etc/pam.d/login) ,这配置里面的 pam_motd.so 模块负责信息的显示。
    信息也分几个部分:
    1. /run/motd.dynamic 与 /etc/motd 里面的内容
    2. /etc/update-motd.d/ 目录的里面脚本执行

    http://askubuntu.com/questions/105689/how-is-etc-motd-updated
    kn007
        5
    kn007  
       Feb 19, 2016
    话说 CentOS 能不能有这个功能。。。
    songjiaxin2008
        6
    songjiaxin2008  
    OP
       Feb 20, 2016
    @kn007 没研究过貌似不行 但是 debian 等使用 apt-get 作为包管理工具的发行版或许可以
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1051 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 18:32 · PVG 02:32 · LAX 11:32 · JFK 14:32
    ♥ Do have faith in what you're doing.