ドキュメント
高度な使用(設定ホックスクリプト)
プロフィール
顆粒構成が必要な場合は、設定スクリプト 'conf' の 交換できる conf ディレクトリ chroot(rootfs)で実行されるように、次の設定スクリプトのホックを含む:
conf/pre-debs # executed before apply-debs conf/post-debs # executed after apply-debs conf/pre-overlay # executed before apply-overlay conf/post-overlay # executed after apply-overlay
hookスクリプトは、次のような用途のケースをサポートする強力なインターフェイスを提供します。
- カスタムデブ(プリデブ)の依存性または予見をインストールする
- インストール後のデブのインストールを調整する(ポスト・デブ)
- パッケージのインストールとオーバーレイ(プレオーバーレイ)を適用する前にカスタマイズ
- オーバーレイ後の調整(ポストオーバーレイ - シンプルなconfと同等の)
DRY - 自分を繰り返してはいけません
上級ユーザーは、高度なconfスクリプトを含む追加DRYサポートも高く評価し、一般的なヘルパー関数やスクリプトを含む機能を提供します。 事例:
conf/functions
install()
{
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y \
-o DPkg::Options::=--force-confdef \
-o DPkg::Options::=--force-confold \
install $@
}
conf/pre-overlay #!/bin/bash -ex source $(dirname $0)/functions install hello
上級hello世界例
tklpatch-example は、tklpatch-example で実行できます。 寸法: --advanced 高度な設定のホックスクリプトや基本的な関数ファイルを含む例のパッチを生成するオプション。
tklpatch-example --advanced helloworld