Les exemples de cette section représentent des fichiers manifest SC terminés qui peuvent être intégrés dans un fichier manifest IA ou inclus par référence.
L'exemple de fichier manifest SC ci-dessous permet de configurer les paramètres suivants :
Comptes utilisateur et root
Fuseau horaire
Nom d'hôte
Type de terminal
Configuration du clavier
NWAM de configuration réseau
<?xml version='1.0'?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="profile" name="system configuration"> <service name="system/install/config" version="1" type="service"> <instance name="default" enabled="true"> <property_group name="user_account" type="application"> <propval name="login" type="astring" value="jack"/> <propval name="password" type="astring" value="encrypted_password"/> <propval name="description" type="astring" value="default_user"/> <propval name="shell" type="astring" value="/usr/bin/bash"/> <propval name="uid" type='count' value='101'/> <propval name="gid" type='count' value='10'/> <propval name="type" type="astring" value="normal"/> <propval name="roles" type="astring" value="root"/> </property_group> <property_group name="root_account" type="application"> <propval name="password" type="astring" value="encrypted_password"/> <propval name="type" type="astring" value="role"/> </property_group> <property_group name="other_sc_params" type="application"> <propval name="timezone" type="astring" value="GMT"/> <propval name="hostname" type="astring" value="solaris"/> </property_group> </instance> </service> <service name="system/console-login" version="1" type="service"> <property_group name="ttymon" type="application"> <propval name="terminal_type" type="astring" value="sun"/> </property_group> </service> <service name='system/keymap' version='1' type='service'> <instance name='default' enabled='true'> <property_group name='keymap' type='system'> <propval name='layout' type='astring' value='US-English'/> </property_group> </instance> </service> <service name="network/physical" version="1" type="service"> <instance name="nwam" enabled="true"/> <instance name="default" enabled="false"/> </service> </service_bundle>
L'exemple de fichier manifest SC ci-dessous permet de configurer les paramètres suivants :
bge0 avec l'adresse IPv4 statique 10.0.0.10, le masque de réseau 255.0.0.0
Route par défaut IPv4 10.0.0.1
bge1 avec type d'adresse addrconf IPv6
Serveur de noms DNS 8.8.8.8
example1.com en tant que nom de domaine DNS local
example2.com, example3.com en tant que liste de recherche DNS pour la recherche de nom d'hôte
<?xml version='1.0'?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="profile" name="system configuration"> <service name="system/install/config" version="1" type="service"> <instance name="default" enabled="true"> <property_group name="user_account" type="application"> <propval name="login" type="astring" value="jack"/> <propval name="password" type="astring" value="encrypted_password"/> <propval name="description" type="astring" value="default_user"/> <propval name="shell" type="astring" value="/usr/bin/bash"/> <propval name="uid" type='count' value='101'/> <propval name="gid" type='count' value='10'/> <propval name="type" type="astring" value="normal"/> <propval name="roles" type="astring" value="root"/> </property_group> <property_group name="root_account" type="application"> <propval name="password" type="astring" value="encrypted_password"/> <propval name="type" type="astring" value="role"/> </property_group> <property_group name="other_sc_params" type="application"> <propval name="timezone" type="astring" value="GMT"/> <propval name="hostname" type="astring" value="solaris"/> </property_group> </instance> </service> <service name="system/console-login" version="1" type="service"> <property_group name="ttymon" type="application"> <propval name="terminal_type" type="astring" value="sun"/> </property_group> </service> <service name='system/keymap' version='1' type='service'> <instance name='default' enabled='true'> <property_group name='keymap' type='system'> <propval name='layout' type='astring' value='US-English'/> </property_group> </instance> </service> <service name="network/physical" version="1" type="service"> <instance name="nwam" enabled="false"/> <instance name="default" enabled="true"/> </service> <service name='network/install' version='1' type='service'> <instance name='default' enabled='true'> <property_group name='install_ipv4_interface' type='application'> <propval name='name' type='astring' value='bge0/v4'/> <propval name='address_type' type='astring' value='static'/> <propval name='static_address' type='net_address_v4' value='10.0.0.10/8'/> <propval name='default_route' type='net_address_v4' value='10.0.0.1'/> </property_group> <property_group name='install_ipv6_interface' type='application'> <propval name='name' type='astring' value='bge1/v6'/> <propval name='address_type' type='astring' value='addrconf'/> <propval name='stateless' type='astring' value='yes'/> <propval name='stateful' type='astring' value='yes'/> </property_group> </instance> </service> <service name='network/dns/install' version='1' type='service'> <instance name='default' enabled='true'> <property_group name='install_props' type='application'> <property name='nameserver' type='net_address'> <net_address_list> <value_node value='8.8.8.8'/> </net_address_list> </property> <property name='domain' type='astring' value='example1.com'/> <property name='search' type='astring'> <astring_list> <value_node value='example2.com'/> <value_node value='example3.com'/> </astring_list> </property> </property_group> </instance> </service> </service_bundle>