Oracle Solaris 11.3 リリースでは、installadm create-manifest および installadm update-manifest コマンドが、作成または更新されるマニフェストをユーザーが編集できるように拡張されています。さらに、インストールサービスで既存のマニフェストから新しいマニフェストを作成できるようになりました。次に例を示します。
create-manifest -n servicename -m new-manifest は、妥当なデフォルト値に基づいた installadm 対話型モードでマニフェストを表示します。
create-manifest -n servicename -f file は、指定された file の内容を使用してマニフェストを作成します。
create-manifest -n servicename -f file -e は、指定された file の内容を使用してマニフェストを編集できるようにします。このファイルが派生マニフェストスクリプトの場合は、エディタが表示されます。選択されるエディタは、VISUAL または EDITOR 環境変数によって定義されます。どちらの変数も定義されていない場合は、vi エディタが使用されます。このファイルが派生マニフェストスクリプトでない場合は、installadm 対話型モードでマニフェストを編集します。
create-manifest -n servicename -M manifest -m new-manifest は、既存の manifest の内容を使用して新しいマニフェストを作成します。
create-manifest -n servicename -M manifest -e -m new-manifest は、既存の manifest の内容を使用して新しいマニフェストを作成します。既存のマニフェストが派生マニフェストスクリプトの場合は、エディタが表示されます。選択されるエディタは、VISUAL または EDITOR 環境変数によって定義されます。どちらの変数も定義されていない場合は、vi エディタが使用されます。既存のマニフェストが派生マニフェストスクリプトでない場合は、installadm 対話型モードでマニフェストを編集します。
update-manifest -n servicename -m new-manifest は、マニフェストを更新します。このマニフェストが派生マニフェストスクリプトの場合は、エディタが表示されます。選択されるエディタは、VISUAL または EDITOR 環境変数によって定義されます。どちらの変数も定義されていない場合は、vi エディタが使用されます。このマニフェストが派生マニフェストスクリプトでない場合は、installadm 対話型モードでマニフェストを編集します。
update-manifest -n servicename -f file -m manifest は、指定された file の内容を使用してマニフェストを更新します。
update-manifest -n servicename -f file -m manifest -e を使用すると、file の内容を使用して更新されたマニフェストを編集できます。このファイルが派生マニフェストスクリプトの場合は、エディタが表示されます。選択されるエディタは、VISUAL または EDITOR 環境変数によって定義されます。どちらの変数も定義されていない場合は、vi エディタが使用されます。このファイルが xml ファイルの場合は、installadm 対話型モードでマニフェストを編集します。
コマンド行で –e オプションを使用すると、対話型エディタモードに移行できます。対話型編集モードになると、次のコマンドを使用できます。
オブジェクトまたはプロパティーを追加します。–w オプションを追加すると、コマンドから、オブジェクトやプロパティーの入力が求められます。下の walk の説明を参照してください。
現在のレベルで行なった変更を破棄し、1 つ上のレベルに移動します。
最上位レベルで、変更を検証し、マニフェストを保存して編集を続行します。
オブジェクトまたはプロパティーを削除します。
現在のレベルで行われた変更を検証し、エラーが発生しなかった場合は 1 つ上のレベルに移動します。
変更が検証されたあとにマニフェストを保存して終了するか、コミットされていない変更を保存しないで終了するか、または編集を続行するか確認するよう要求します。
1 つ下のレベルまでのすべてのオブジェクトとプロパティーを表示します。
複数のオブジェクト (ソフトウェアパブリッシャーなど) の順序を変更します。
オブジェクトを選択し、そのレベルに移動します。
プロパティーの値を設定します。
選択されたオブジェクトの設定可能な各プロパティーおよび設定可能なサブオブジェクトまたはサブプロパティー (存在する場合) の入力を要求します。
installadm(1M) のマニュアルページには、対話型モードを示すいくつかの例が記載されています。次の各セクションでは、追加の例を示します。
使用例 69 walk モードでの installadm によるマニフェストエントリの作成この例では、test という名前のマニフェストに 2 番目のパブリッシャーが追加されます。
# installadm create-manifest -n default-sparc -m test
installadm:test> select software
installadm:test:software> info
type: IPS
name: <not specified>
facet[1]:
...
facet[20]:
name: facet.locale.zh_TW
value: true
publisher:
name: solaris
key: <not specified>
cert: <not specified>
ca-cert: <not specified>
origin: http://pkg.oracle.com/solaris/release
mirror: <not specified>
cmd-options: <not specified>
pkg-list:
action: install
name: pkg:/entire@0.5.11-0.175.3
name: pkg:/group/system/solaris-large-server
reject: <not specified>
installadm:test:software> add -w publisher
*** To terminate walk, use Ctrl-D ***
name [<not specified>]: firstboot
key [<not specified>]:
cert [<not specified>]:
ca-cert [<not specified>]:
origin [<not specified>]: file:///net/host1/export/firstbootrepo
origin [<not specified>]:
mirror [<not specified>]:
cmd-options [<not specified>]:
installadm:test:software:publisher> info
name: firstboot
key: <not specified>
cert: <not specified>
ca-cert: <not specified>
origin: file:///net/host1/export/firstbootrepo
mirror: <not specified>
cmd-options: <not specified>
installadm:test:software:publisher> end
installadm:test:software> exit
1. Save manifest and exit
2. Exit without saving uncommitted changes
3. Continue editing
Please select choice: 1
Created Manifest: 'test'
使用例 70 installadm によるオブジェクトの順序の変更
この例では、パブリッシャーの順序が切り替えられます。
# installadm update-manifest -n default-sparc -m test
installadm:test> select software
installadm:test:software> info
type: IPS
name: <not specified>
facet[1]:
...
facet[20]:
name: facet.locale.zh_TW
value: true
publisher[1]:
name: solaris
key: <not specified>
cert: <not specified>
ca-cert: <not specified>
origin: http://pkg.oracle.com/solaris/release
mirror: <not specified>
cmd-options: <not specified>
publisher[2]:
name: firstboot
key: <not specified>
cert: <not specified>
ca-cert: <not specified>
origin: http://example.com/solaris/mybuild
mirror: <not specified>
cmd-options: <not specified>
pkg-list:
action: install
name: pkg:/entire@0.5.11-0.175.3
name: pkg:/group/system/solaris-large-server
reject: <not specified>
installadm:test:software> move publisher 2 1
installadm:test:software> info
type: IPS
name: <not specified>
...
publisher[1]:
name: firstboot
key: <not specified>
cert: <not specified>
ca-cert: <not specified>
origin: http://example.com/solaris/mybuild
mirror: <not specified>
cmd-options: <not specified>
publisher[2]:
name: solaris
key: <not specified>
cert: <not specified>
ca-cert: <not specified>
origin: http://pkg.oracle.com/solaris/release
mirror: <not specified>
cmd-options: <not specified>
pkg-list:
action: install
name: pkg:/entire@0.5.11-0.175.3
name: pkg:/group/system/solaris-large-server
reject: <not specified>
installadm:test:software> exit
1. Save manifest and exit
2. Exit without saving uncommitted changes
3. Continue editing
Please select choice: 1
Updated Manifest: 'test'