大多数变量可以具有任意数量的值。例如,arch 变量可以设置为 i386、sparc、ppc、arm 或分发支持的任何体系结构。(Oracle Solaris 中仅使用 i386 和 sparc。)但 debug 变量例外。debug 变量只能设置为 true 或 false;其他值的行为不确定。如果 file 操作同时具有非调试和调试版本,则必须针对这两个版本明确设置适用的 debug 变量,如以下示例所示:
file group=sys mode=0644 overlay=allow owner=root \ path=etc/motd pkg.csize=115 pkg.size=103 preserve=true \ variant.debug.osnet=true file group=sys mode=0644 overlay=allow owner=root \ path=etc/motd pkg.csize=68 pkg.size=48 preserve=true \ variant.debug.osnet=false
以下是 Oracle Solaris 中的常用变量标记。
|
侧面为布尔型:只能设置为 true(启用)或 false(禁用)。缺省情况下,映像中的所有侧面都被视为 true。某一操作的侧面标记只能具有 true 值;其他值代表的行为不确定。
映像上设置的侧面可以为完整侧面(如 doc.man)或模式(如 locale.*)。要禁用侧面名称空间的一部分,仅启用其中的几个侧面时,这种灵活性很有用。例如,您可以禁用所有语言环境,然后仅启用一个或两个特定语言环境,如以下示例所示:
$ pkg change-facet 'locale.*=false' [output about packages being updated] $ pkg change-facet locale.en_US=true [output about packages being updated]
以下列表描述了 Oracle Solaris 中使用的一小部分侧面标记:
facet.devel facet.doc facet.doc.html facet.doc.info facet.doc.man facet.doc.pdf facet.locale.de facet.locale.en_GB facet.locale.en_US facet.locale.fr facet.locale.ja_JP facet.locale.zh_CN