linux update-rc.dノート

1247 ワード

概要

  • UbuntuまたはDebianシステムにおけるupdate-rc.dコマンドは、システム起動項目を更新するためのスクリプトです.これらのスクリプトのリンクは/etc/rcNにあります.d/ディレクトリ、対応スクリプトは/etc/initにある.d/ディレクトリ.
  • /etc/rcN.d,Nは0-6とSレベルのrunlevel,すなわちrc 0を表す.dはrunlevelが0の起動自動起動を表し、このように
  • を押す.
  • runlevel
  • について

    コマンドパラメータ

    $ update-rc.d --help
    usage: update-rc.d [-n] [-f]  remove
           update-rc.d [-n]  defaults [NN | SS KK]         // NN SS KK 00-99
           update-rc.d [-n]  start|stop NN runlvl [runlvl] [...] .  //  , 
           update-rc.d [-n]  disable|enable [S|2|3|4|5]
            -n: not really   // ,not readlly ? ?
            -f: force        // , /etc/init.d/ 
    
    The disable|enable API is not stable and might change in the future.
    

    使用方法

    $ update-rc.d -f  remove         //   
    $ update-rc.d  start 20 2 3 4 5 . stop 20 0 1 6 .
    //  , runlevel 2,3,4,5 20 , runlevel 0,1,6 20 
    //  
    $ update-rc.d  defaults           //  
    $ update-rc.d  defaults 80 20 //   80 , 20