yuu_nkjm blog


2008-07-25(Fri) [長年日記]

[Linux] chkconfigに登録するスクリプトの書式

chkconfigにinit.d以下のスクリプトを扱わせるには,以下のフォーマットに従ったスクリプトを設置する必要がある.以下,manより抜粋.

Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chk- config what runlevels the service should be started in by default, as well as the start and stop priority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list. The second line contains a description for the service, and may be extended across multiple lines with backslash con- tinuation.

For example, random.init has these three lines:
# chkconfig: 2345 20 80
# description: Saves and restores system entropy pool for \
# higher quality random number generation.

This says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop priority should be 80. You should be able to figure out what the description says; the \ causes the line to be continued. The extra space in front of the line is ignored.

本日のリンク元
その他のリンク元
検索

トップ «前の日記(2008-07-22(Tue)) 最新 次の日記(2008-08-05(Tue))» 月表示 編集 設定
2006|01|06|12|
2007|06|09|
2008|01|03|04|06|07|08|09|10|12|
2009|01|02|05|06|07|08|10|11|12|
2010|03|04|05|06|07|08|09|10|11|
2011|01|02|03|04|05|06|07|08|09|11|12|
2012|01|02|04|06|07|08|10|11|12|
2013|01|02|03|07|08|10|11|12|
2014|01|02|04|05|06|07|08|09|10|11|
2015|01|02|07|11|12|
2016|01|03|05|07|08|09|