JavaScript is required to for searching.
ナビゲーションリンクをスキップ
印刷ビューの終了
アプリケーションパッケージ開発者ガイド     Oracle Solaris 10 1/13 Information Library (日本語)
search filter icon
search icon

ドキュメントの情報

はじめに

1.  パッケージの設計

2.  パッケージの構築

3.  パッケージの機能の拡張 (タスク)

4.  パッケージの確認と転送

5.  パッケージ作成のケーススタディー

管理者による入力の要求

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

prototype ファイル

request スクリプト

インストール時のファイル作成と削除時のファイル保存

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

prototype ファイル

space ファイル

i.admin クラスアクションスクリプト

r.cfgdata 削除スクリプト

パッケージの互換性と依存関係の定義

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

copyright ファイル

compver ファイル

depend ファイル

標準クラスとクラスアクションスクリプトを使用したファイルの変更

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

prototype ファイル

i.inittab インストールクラスアクションスクリプト

r.inittab 削除クラスアクションスクリプト

inittab ファイル

sed クラスと postinstall スクリプトを使用したファイルの変更

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

prototype ファイル

sed クラスアクションスクリプト (/etc/inittab)

postinstall スクリプト

build クラスを使用したファイルの変更

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

prototype ファイル

構築ファイル

インストール時の crontab ファイルの変更

手法

アプローチ

ケーススタディーのファイル

pkginfo コマンド

prototype ファイル

i.cron インストールクラスアクションスクリプト

r.cron 削除クラスアクションスクリプト

crontab ファイル 1

crontab ファイル 2

手続きスクリプトによるドライバのインストールと削除

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

prototype ファイル

request スクリプト

postinstall スクリプト

preremove スクリプト

sed クラスと手続きスクリプトを使用したドライバのインストール

手法

アプローチ

ケーススタディーのファイル

pkginfo ファイル

prototype ファイル

sed クラスアクションスクリプト (/etc/devlink.tab)

postinstall インストールスクリプト

preremove 削除スクリプト

copyright ファイル

6.  パッケージの作成のための高度な手法

用語集

索引

管理者による入力の要求

このケーススタディーで使用するパッケージには、3 種類のオブジェクトがあります。インストールするオブジェクトの種類と、インストール先マシン内でオブジェクトを配置する場所は、管理者が選択できます。

手法

このケーススタディーでは、次の手法の実例を示します。

アプローチ

このケーススタディーで選択的インストールを設定するには、次のタスクを完了する必要があります。

ケーススタディーのファイル

pkginfo ファイル

PKG=ncmp
NAME=NCMP Utilities
CATEGORY=application, tools
BASEDIR=/
ARCH=SPARC
VERSION=RELEASE 1.0, Issue 1.0
CLASSES=""
NCMPBIN=/bin
NCMPMAN=/usr/man
EMACS=/usr/emacs

prototype ファイル

i pkginfo
i request
x bin $NCMPBIN 0755 root other
f bin $NCMPBIN/dired=/usr/ncmp/bin/dired 0755 root other
f bin $NCMPBIN/less=/usr/ncmp/bin/less 0755 root other
f bin $NCMPBIN/ttype=/usr/ncmp/bin/ttype 0755 root other
f emacs $NCMPBIN/emacs=/usr/ncmp/bin/emacs 0755 root other
x emacs $EMACS 0755 root other
f emacs $EMACS/ansii=/usr/ncmp/lib/emacs/macros/ansii 0644 root other
f emacs $EMACS/box=/usr/ncmp/lib/emacs/macros/box 0644 root other
f emacs $EMACS/crypt=/usr/ncmp/lib/emacs/macros/crypt 0644 root other
f emacs $EMACS/draw=/usr/ncmp/lib/emacs/macros/draw 0644 root other
f emacs $EMACS/mail=/usr/ncmp/lib/emacs/macros/mail 0644 root other
f emacs $NCMPMAN/man1/emacs.1=/usr/ncmp/man/man1/emacs.1 0644 root other
d man $NCMPMAN 0755 root other
d man $NCMPMAN/man1 0755 root other
f man $NCMPMAN/man1/dired.1=/usr/ncmp/man/man1/dired.1 0644 root other
f man $NCMPMAN/man1/ttype.1=/usr/ncmp/man/man1/ttype.1 0644 root other
f man $NCMPMAN/man1/less.1=/usr/ncmp/man/man1/less.1 0644 inixmr other

request スクリプト

trap 'exit 3' 15
# determine if and where general executables should be placed
ans=`ckyorn -d y \
-p "Should executables included in this package be installed"
` || exit $?
if [ "$ans" = y ]
then
   CLASSES="$CLASSES bin"
   NCMPBIN=`ckpath -d /usr/ncmp/bin -aoy \
   -p "Where should executables be installed"
   ` || exit $?
fi
# determine if emacs editor should be installed, and if it should
# where should the associated macros be placed
ans=`ckyorn -d y \
-p "Should emacs editor included in this package be installed"
` || exit $?
if [ "$ans" = y ]
then
   CLASSES="$CLASSES emacs"
   EMACS=`ckpath -d /usr/ncmp/lib/emacs -aoy \
   -p "Where should emacs macros be installed"
   ` || exit $?
fi

request スクリプトは、ファイルシステム上にファイルを残さずに終了できます。Oracle Solaris の 2.5 よりも前のバージョンおよび互換バージョンでのインストールでは、checkinstall スクリプトが使用されていない可能性があるので、インストールが確実に成功するように、request スクリプトを使用してファイルシステムの必要なテストを行うことをお勧めします。request スクリプトがコード 1 で終了すると、インストールはクリーンに終了します。

これらのファイル例では、パラメータ型パスを使用して複数のベースディレクトリを確立する方法が示されています。しかし、pkgadd コマンドによって管理および検証される BASEDIR パラメータを使用する必要が生じる場合もあります。複数のベースディレクトリを使用する際には、同じプラットフォームに複数のバージョンやアーキテクチャーをインストールする場合に備えて、特別な注意を払う必要があります。