.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "DH_INSTALLINIT 1" .TH DH_INSTALLINIT 1 "2017-01-25" "10.2.5" "Debhelper" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "名前" .IX Header "名前" dh_installinit \- ビルドディレクトリに service init ファイルをインストールする .SH "書式" .IX Header "書式" \&\fBdh_installinit\fR [\fIdebhelper options\fR] [\fB\-\-name=\fR\fIname\fR] [\fB\-n\fR] [\fB\-R\fR] [\fB\-r\fR] [\fB\-d\fR] [\fB\-\-\fR \fIparams\fR] .SH "説明" .IX Header "説明" \&\fBdh_installinit\fR is a debhelper program that is responsible for installing init scripts with associated defaults files, as well as upstart job files, and systemd service files into package build directories. .PP このコマンドは、\fI/etc/rc*.d/\fR 以下にシンボリックリンクを張り、start と stop 手続きを持つような init スクリプトをセットアップするのに必要な \fIpostinst\fR, \fIpostrm\fR, \fIprerm\fR コマンドを自動的に生成します。 .SH "ファイル" .IX Header "ファイル" .IP "debian/\fIpackage\fR.init" 4 .IX Item "debian/package.init" もし本ファイルが存在すれば、パッケージビルドディレクトリ以下の etc/init/\fIpackage\fR ディレクトリにインストールされます。 .IP "debian/\fIpackage\fR.default" 4 .IX Item "debian/package.default" もしこちらが存在すれば、パッケージビルドディレクトリ内の etc/default/\fIpackage\fR へこのファイルをインストールします。 .IP "debian/\fIpackage\fR.upstart" 4 .IX Item "debian/package.upstart" もし本ファイルが存在すれば、パッケージビルドディレクトリ以下に etc/init/\fIpackage\fR.conf ファイルとしてインストールされます。 .IP "debian/\fIpackage\fR.service" 4 .IX Item "debian/package.service" If this exists, it is installed into lib/systemd/system/\fIpackage\fR.service in the package build directory. Only used in compat levels 10 and below. .IP "debian/\fIpackage\fR.tmpfile" 4 .IX Item "debian/package.tmpfile" If this exists, it is installed into usr/lib/tmpfiles.d/\fIpackage\fR.conf in the package build directory. (The tmpfiles.d mechanism is currently only used by systemd.) Only used in compat levels 10 and below. .SH "オプション" .IX Header "オプション" .IP "\fB\-n\fR, \fB\-\-no\-scripts\fR" 4 .IX Item "-n, --no-scripts" \&\fIpostinst\fR/\fIpostrm\fR/\fIprerm\fR スクリプトは変更しないでください。 .IP "\fB\-o\fR, \fB\-\-only\-scripts\fR" 4 .IX Item "-o, --only-scripts" Only modify \fIpostinst\fR/\fIpostrm\fR/\fIprerm\fR scripts, do not actually install any init script, default files, upstart job or systemd service file. May be useful if the file is shipped and/or installed by upstream in a way that doesn't make it easy to let \fBdh_installinit\fR find it. .Sp \&\fBCaveat\fR: This will bypass all the regular checks and \fIunconditionally\fR modify the scripts. You will almost certainly want to use this with \fB\-p\fR to limit, which packages are affected by the call. Example: .Sp .Vb 3 \& override_dh_installinit: \& dh_installinit \-pfoo \-\-only\-scripts \& dh_installinit \-\-remaining .Ve .IP "\fB\-R\fR, \fB\-\-restart\-after\-upgrade\fR" 4 .IX Item "-R, --restart-after-upgrade" Do not stop the init script until after the package upgrade has been completed. This is the default behaviour in compat 10. .Sp In early compat levels, the default was to stop the script in the \fIprerm\fR, and starts it again in the \fIpostinst\fR. .Sp このオプションは、アップグレード中に長く動作が停止してはいけないような daemon を扱う際に便利です。しかしながら、このオプションを利用して dh_installinit が処理をしている間のアップグレード途中のパッケージを daemon が参照して混乱しないことを保証する必要があります。 .IP "\fB\-\-no\-restart\-after\-upgrade\fR" 4 .IX Item "--no-restart-after-upgrade" Undo a previous \fB\-\-restart\-after\-upgrade\fR (or the default of compat 10). If no other options are given, this will cause the service to be stopped in the \fIprerm\fR script and started again in the \fIpostinst\fR script. .IP "\fB\-r\fR, \fB\-\-no\-stop\-on\-upgrade\fR, \fB\-\-no\-restart\-on\-upgrade\fR" 4 .IX Item "-r, --no-stop-on-upgrade, --no-restart-on-upgrade" init スクリプトをアップグレード中には停止させません。 .IP "\fB\-\-no\-start\fR" 4 .IX Item "--no-start" インストール時、あるいはアップグレード時に init スクリプトを start させません。あるいは、パッケージを削除する時にも stop 手続きが呼ばれなくなります。その一方で、\fBupdate\-rc.d\fR のみ呼び出されます。本オプションは rcS スクリプトをインストールする際に便利です。 .IP "\fB\-d\fR, \fB\-\-remove\-d\fR" 4 .IX Item "-d, --remove-d" Remove trailing \fBd\fR from the name of the package, and use the result for the filename the upstart job file is installed as in \fIetc/init/\fR , and for the filename the init script is installed as in etc/init.d and the default file is installed as in \fIetc/default/\fR. This may be useful for daemons with names ending in \fBd\fR. (Note: this takes precedence over the \fB\-\-init\-script\fR parameter described below.) .IP "\fB\-u\fR\fIparams\fR \fB\-\-update\-rcd\-params=\fR\fIparams\fR" 4 .IX Item "-uparams --update-rcd-params=params" .PD 0 .IP "\fB\-\-\fR \fIparams\fR" 4 .IX Item "-- params" .PD \&\fIparams\fR を \fIupdate\-rc.d\fR\|(8) へ渡します。もし指定されていなければ、\fBdefaults\fR パラメータが \&\fIupdate\-rc.d\fR\|(8) へ渡されます。 .IP "\fB\-\-name=\fR\fIname\fR" 4 .IX Item "--name=name" パッケージ名の代わりに、\fIname\fR をファイル名とするファイルを、upstart 用 job ファイルや、init スクリプト (あるいはデフォルトのファイル) として利用します。このパラメータが利用されると、\fBdh_installinit\fR は \&\fIdebian/package.name.upstart\fR、\fIdebian/package.name.init\fR、\fIdebian/package.name.default\fR を探し、インストールを行います。この場合、通常使われる \&\fIdebian/package.upstart\fR、\fIdebian/package.init\fR、\fIdebian/package.default\fR は利用されません。 .IP "\fB\-\-init\-script=\fR\fIscriptname\fR" 4 .IX Item "--init-script=scriptname" \&\fIscriptname\fR を \fIetc/init.d/\fR 以下にインストールする init スクリプトのファイル名として利用します (デフォルトのファイルがインストールされるなら、その時の名前として利用する場合もあります) 。もしこのパラメータを利用すると、\fBdh_installinit\fR は \fIdebian/\fR ディレクトリ以下に \&\fIpackage.scriptname\fR のような名前のファイルがあるかどうかを探し、通常インストールするファイルよりも、優先してこのような名前を持つファイルを init スクリプトとして扱うようになります。 .Sp このパラメータは廃止されています。代わりに \fB\-\-name\fR パラメータを利用ください。なお、\fB\-\-init\-script=\fR\fIscriptname\fR では upstart 用 job ファイルを扱うようには出来ていません。 .IP "\fB\-\-error\-handler=\fR\fIfunction\fR" 4 .IX Item "--error-handler=function" もしinitスクリプトの動作が失敗に終わった時、シェル関数の \fIfunction\fR を呼び出すようにします。この関数は、\fIprerm\fR や \&\fIpostinst\fR の中で定義されていなければならず、また、\fB#DEBHELPER#\fR 句が現れるよりも前に定義されている必要があります。 .SH "付記" .IX Header "付記" このコマンドは複数回実行しても安全なコマンドではありません。このコマンドを複数回呼び出す際には必ず間に \fIdh_prep\fR\|(1) を挿入してください。さもないと、メンテナスクリプト中に同じ内容のコードを繰り返し挿入してしまいます。 .SH "参照" .IX Header "参照" \&\fIdebhelper\fR\|(7) .PP このプログラムは debhelper の一部です。 .SH "作者" .IX Header "作者" Joey Hess .PP Steve Langasek .PP Michael Stapelberg