5209 Enhancements to the mkrepo script slim_1003
authorKaren Tung <Karen.Tung@Sun.COM>
Tue, 09 Feb 2010 10:49:14 -0800
branchslim_1003
changeset 726 2fefdefdf6dd
parent 724 5ac9e50ed6bc
child 729 d894a1a34175
5209 Enhancements to the mkrepo script
usr/src/cmd/distro_const/DC-manifest.rng
usr/src/cmd/distro_const/auto_install/Makefile
usr/src/cmd/distro_const/auto_install/ai_generic_live.xml
usr/src/cmd/distro_const/auto_install/ai_live.xml
usr/src/cmd/distro_const/auto_install/ai_sparc_image.xml
usr/src/cmd/distro_const/auto_install/ai_x86_image.xml
usr/src/cmd/distro_const/slim_cd/Makefile
usr/src/cmd/distro_const/slim_cd/all_lang_slim_cd_x86.xml
usr/src/cmd/distro_const/slim_cd/slim_cd_x86.xml
usr/src/cmd/distro_const/slim_cd/slimcd_generic_live.xml
usr/src/cmd/distro_const/slim_cd/slimcd_live.xml
usr/src/cmd/distro_const/utils/Makefile
usr/src/cmd/distro_const/utils/boot_archive_configure
usr/src/cmd/distro_const/utils/generic_live.xml
usr/src/cmd/distro_const/utils/mkrepo
usr/src/cmd/slim-install/svc/live_fs_include.sh
usr/src/cmd/slim-install/svc/media-fs-root
usr/src/cmd/slim-install/svc/net-fs-root
usr/src/pkgdefs/SUNWdistro-const/prototype_com
--- a/usr/src/cmd/distro_const/DC-manifest.rng	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/DC-manifest.rng	Tue Feb 09 10:49:14 2010 -0800
@@ -559,6 +559,17 @@
 				<zeroOrMore>
 					<ref name= "nm_adjustment"/>
 				</zeroOrMore>
+
+                               <!-- SMF service profiles to apply to the
+                                     boot archive.  It's optional,
+                                     and no default  -->
+                               <optional>
+                                        <element name="smf_service_profile">
+						<oneOrMore>
+							<ref name="nm_smf_profile"/>
+						</oneOrMore>
+					</element>
+                               </optional>
 			</interleave>
 		</element>
 	</define>
@@ -830,4 +841,26 @@
 			</element>
 		</optional>
 	</define>
+
+
+	<!--
+	=======================================================================
+	=======================================================================
+	SMF service profiles
+	=======================================================================
+	=======================================================================
+	-->
+	<define name="nm_smf_profile">
+		<element name="profile">
+			<attribute name="path">
+				<text/>
+			</attribute>
+
+			<optional>
+			    <attribute name="use_build_sys_file">
+				<data type="boolean"/>
+			    </attribute>
+			</optional>
+		</element>
+	</define>
 </grammar>
--- a/usr/src/cmd/distro_const/auto_install/Makefile	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/auto_install/Makefile	Tue Feb 09 10:49:14 2010 -0800
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -35,7 +35,7 @@
 
 PYCMODULES=	$(PYMODULES:%.py=%.pyc)
 
-AUTOINSTALL_FILES=	ai_generic_live.xml \
+AUTOINSTALL_FILES=	ai_live.xml \
 			ai_x86_image.xml \
 			ai_sparc_image.xml \
 			ai_boot_archive_configure \
--- a/usr/src/cmd/distro_const/auto_install/ai_generic_live.xml	Tue Feb 09 12:45:59 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
-<!--
-    CDDL HEADER START
-   
-    The contents of this file are subject to the terms of the
-    Common Development and Distribution License (the "License").
-    You may not use this file except in compliance with the License.
-   
-    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-    or http://www.opensolaris.org/os/licensing.
-    See the License for the specific language governing permissions
-    and limitations under the License.
-   
-    When distributing Covered Code, include this CDDL HEADER in each
-    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-    If applicable, add the following below this CDDL HEADER, with the
-    fields enclosed by brackets "[]" replaced with your own identifying
-    information: Portions Copyright [yyyy] [name of copyright owner]
-   
-    CDDL HEADER END
-   
-    Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-    Use is subject to license terms.
-
-    Service profile customized for Automated Installer
-
-    NOTE:  Service profiles delivered by this package are not editable,
-    and their contents will be overwritten by package or patch
-    operations, including operating system upgrade.  Make customizations
-    in a different file.  The path, /var/svc/profile/site.xml, is a
-    distinguished location for a site-specific service profile, treated
-    otherwise equivalently to this file.
--->
-<service_bundle type='profile' name='generic_live'
-	 xmlns:xi='http://www.w3.org/2003/XInclude' >
-  <!--
-      svc.startd(1M) services
-  -->
-  <service name='system/boot-archive-update' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/coreadm' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/cron' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/cryptosvc' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/fmd' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/identity' version='1' type='service'>
-    <instance name='domain' enabled='true'/>
-  </service>
-  <service name='system/intrd' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/keymap' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/metainit' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/metasync' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/picl' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/sac' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/scheduler' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/system-log' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/utmp' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/zones' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='network/rpc/bind' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/name-service-cache' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='network/nfs/status' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/nlockmgr' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/client' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/cbd' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/mapid' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nis/client' version='1' type='service'>
-      <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/physical' version='1' type='service'>
-      <instance name='default' enabled='true'/>
-      <instance name='nwam' enabled='false'/>
-  </service>
-  <service name='network/rpc/keyserv' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/routing/ndp' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/shares/group' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/ssh' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/smtp' version='1' type='service'>
-    <instance name='sendmail' enabled='false'/>
-  </service>
-  <service name='network/inetd' version='1' type='restarter'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='network/dns/multicast' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/dumpadm' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/filesystem/autofs' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/power' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-
-  <service name='application/manifest-locator' version='1' type='service'>
-    <instance name='default' enabled='true' />
-  </service>
-
-  <service name='application/auto-installer' version='1' type='service'>
-    <instance name='default' enabled='true' />
-  </service>
-
-  <!--
-      Default service instances cloned as live-media instances
-  -->
-  <service name='system/sysidtool' version='1' type='service'>
-    <instance name='system' enabled='false'/>
-    <instance name='live-media' enabled='true'/>
-  </service>
-  <service name='system/filesystem/root-minimal' version='1' type='service'>
-    <instance name='live-media' enabled='true'/>
-  </service>
-  <service name='system/filesystem/root' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-    <instance name='live-media' enabled='true'/>
-    <instance name='net' enabled='false'/>
-  </service>
-  <service name='system/filesystem/usr' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-    <instance name='live-media' enabled='true'/>
-  </service>
-</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/distro_const/auto_install/ai_live.xml	Tue Feb 09 10:49:14 2010 -0800
@@ -0,0 +1,52 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<!--
+    CDDL HEADER START
+   
+    The contents of this file are subject to the terms of the
+    Common Development and Distribution License (the "License").
+    You may not use this file except in compliance with the License.
+   
+    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+    or http://www.opensolaris.org/os/licensing.
+    See the License for the specific language governing permissions
+    and limitations under the License.
+   
+    When distributing Covered Code, include this CDDL HEADER in each
+    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+    If applicable, add the following below this CDDL HEADER, with the
+    fields enclosed by brackets "[]" replaced with your own identifying
+    information: Portions Copyright [yyyy] [name of copyright owner]
+   
+    CDDL HEADER END
+   
+    Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+    Use is subject to license terms.
+
+    Service profile customization for Automated Installer image
+-->
+<service_bundle type='profile' name='ai_live'
+	 xmlns:xi='http://www.w3.org/2003/XInclude' >
+  <!--
+      svc.startd(1M) services
+  -->
+  <service name='network/physical' version='1' type='service'>
+      <instance name='default' enabled='true'/>
+      <instance name='nwam' enabled='false'/>
+  </service>
+  <service name='network/routing/ndp' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/shares/group' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/dns/multicast' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='application/manifest-locator' version='1' type='service'>
+    <instance name='default' enabled='true' />
+  </service>
+  <service name='application/auto-installer' version='1' type='service'>
+    <instance name='default' enabled='true' />
+  </service>
+</service_bundle>
--- a/usr/src/cmd/distro_const/auto_install/ai_sparc_image.xml	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/auto_install/ai_sparc_image.xml	Tue Feb 09 10:49:14 2010 -0800
@@ -96,7 +96,6 @@
 						name="ba-config"
 						message="Boot archive configuration"/>
 					<argslist>
-						"/usr/share/distro_const/auto_install/ai_generic_live.xml"
 						".autoinstall"
 					</argslist>
 				</script>
@@ -142,6 +141,27 @@
 				     types are gzip and none
 				-->
 				<compression type="gzip" level="9"/>
+
+                                <!--
+                                    SMF service profiles to apply to the boot archive.
+                                    If the "use_build_sys_file" attribute is set to true, the build
+                                    system's copy of the file is used.  If not specified, or
+                                    "use_build_sys_file" is set to false,
+                                    the image's copy of the file is used.
+
+                                    Service profiles will be applied to the root archive
+                                    in the order listed.
+                                -->
+                                <smf_service_profile>
+                                        <profile path="/var/svc/profile/generic_limited_net.xml"
+                                                 use_build_sys_file="false"/>
+                                        <profile path="/usr/share/distro_const/generic_live.xml"
+                                                 use_build_sys_file="true"/>
+                                        <profile path="/usr/share/distro_const/auto_install/ai_live.xml"
+                                                 use_build_sys_file="true"/>
+                                        <profile path="/var/svc/profile/ns_files.xml"
+                                                 use_build_sys_file="false"/>
+                                </smf_service_profile>
 			</boot_archive>
 		</output_image>
 	</distro_constr_params>
--- a/usr/src/cmd/distro_const/auto_install/ai_x86_image.xml	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/auto_install/ai_x86_image.xml	Tue Feb 09 10:49:14 2010 -0800
@@ -96,7 +96,6 @@
 						name="ba-config"
 						message="Boot archive configuration"/>
 					<argslist>
-						"/usr/share/distro_const/auto_install/ai_generic_live.xml"
 						".autoinstall"
 					</argslist>
 				</script>
@@ -162,6 +161,27 @@
 				     types are gzip and none
 				-->
 				<compression type="gzip" level="9"/>
+
+                                <!--
+                                    SMF service profiles to apply to the boot archive.
+                                    If the "use_build_sys_file" attribute is set to true, the build
+                                    system's copy of the file is used.  If not specified, or
+                                    "use_build_sys_file" is set to false,
+                                    the image's copy of the file is used.
+
+                                    Service profiles will be applied to the root archive
+                                    in the order listed.
+                                -->
+                                <smf_service_profile>
+                                        <profile path="/var/svc/profile/generic_limited_net.xml"
+                                                 use_build_sys_file="false"/>
+                                        <profile path="/usr/share/distro_const/generic_live.xml"
+                                                 use_build_sys_file="true"/>
+                                        <profile path="/usr/share/distro_const/auto_install/ai_live.xml"
+                                                 use_build_sys_file="true"/>
+                                        <profile path="/var/svc/profile/ns_files.xml"
+                                                 use_build_sys_file="false"/>
+                                </smf_service_profile>
 			</boot_archive>
 		</output_image>
 	</distro_constr_params>
--- a/usr/src/cmd/distro_const/slim_cd/Makefile	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/slim_cd/Makefile	Tue Feb 09 10:49:14 2010 -0800
@@ -32,7 +32,7 @@
 install:=       TARGET= install
 
 SLIMCD_FILES=	slimcd_iso.sort \
-		slimcd_generic_live.xml \
+		slimcd_live.xml \
 		slimcd_boot_archive_configure \
 		slim_cd_x86.xml \
 		all_lang_slim_cd_x86.xml \
--- a/usr/src/cmd/distro_const/slim_cd/all_lang_slim_cd_x86.xml	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/slim_cd/all_lang_slim_cd_x86.xml	Tue Feb 09 10:49:14 2010 -0800
@@ -102,7 +102,6 @@
 						name="ba-config"
 						message="Boot archive configuration"/>
 					<argslist>
-						"/usr/share/distro_const/slim_cd/slimcd_generic_live.xml"
 						".livecd"
 					</argslist>
 				</script>
@@ -161,6 +160,27 @@
 				     types are gzip and none
 				-->
 				<compression type="gzip" level="9"/>
+
+				<!--
+				    SMF service profiles to apply to the boot archive.
+				    If the "use_build_sys_file" attribute is set to true, the build
+				    system's copy of the file is used.  If not specified, or
+				    "use_build_sys_file" is set to false, 
+				    the image's copy of the file is used.
+
+				    Service profiles will be applied to the root archive
+				    in the order listed.
+				-->
+				<smf_service_profile>
+					<profile path="/var/svc/profile/generic_limited_net.xml"
+					         use_build_sys_file="false"/>
+					<profile path="/usr/share/distro_const/generic_live.xml"
+					         use_build_sys_file="true"/>
+					<profile path="/usr/share/distro_const/slim_cd/slimcd_live.xml"
+					         use_build_sys_file="true"/>
+					<profile path="/var/svc/profile/ns_files.xml"
+					         use_build_sys_file="false"/>
+				</smf_service_profile>
 			</boot_archive>
 		</output_image>
 	</distro_constr_params>
--- a/usr/src/cmd/distro_const/slim_cd/slim_cd_x86.xml	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/slim_cd/slim_cd_x86.xml	Tue Feb 09 10:49:14 2010 -0800
@@ -102,7 +102,6 @@
 						name="ba-config"
 						message="Boot archive configuration"/>
 					<argslist>
-						"/usr/share/distro_const/slim_cd/slimcd_generic_live.xml"
 						".livecd"
 					</argslist>
 				</script>
@@ -161,6 +160,26 @@
 				     types are gzip and none
 				-->
 				<compression type="gzip" level="9"/>
+				<!--
+				    SMF service profiles to apply to the boot archive.
+				    If the "use_build_sys_file" attribute is set to true, the build
+				    system's copy of the file is used.  If not specified, or
+				    "use_build_sys_file" is set to false, 
+				    the image's copy of the file is used.
+
+				    Service profiles will be applied to the root archive
+				    in the order listed.
+				-->
+				<smf_service_profile>
+					<profile path="/var/svc/profile/generic_limited_net.xml"
+					         use_build_sys_file="false"/>
+					<profile path="/usr/share/distro_const/generic_live.xml"
+					         use_build_sys_file="true"/>
+					<profile path="/usr/share/distro_const/slim_cd/slimcd_live.xml"
+					         use_build_sys_file="true"/>
+					<profile path="/var/svc/profile/ns_files.xml"
+					         use_build_sys_file="false"/>
+				</smf_service_profile>
 			</boot_archive>
 		</output_image>
 	</distro_constr_params>
--- a/usr/src/cmd/distro_const/slim_cd/slimcd_generic_live.xml	Tue Feb 09 12:45:59 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,282 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
-<!--
-    CDDL HEADER START
-   
-    The contents of this file are subject to the terms of the
-    Common Development and Distribution License (the "License").
-    You may not use this file except in compliance with the License.
-   
-    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-    or http://www.opensolaris.org/os/licensing.
-    See the License for the specific language governing permissions
-    and limitations under the License.
-   
-    When distributing Covered Code, include this CDDL HEADER in each
-    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-    If applicable, add the following below this CDDL HEADER, with the
-    fields enclosed by brackets "[]" replaced with your own identifying
-    information: Portions Copyright [yyyy] [name of copyright owner]
-   
-    CDDL HEADER END
-   
-    Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-    Use is subject to license terms.
-
-    Service profile customized for Live DVD usage.
-
-    NOTE:  Service profiles delivered by this package are not editable,
-    and their contents will be overwritten by package or patch
-    operations, including operating system upgrade.  Make customizations
-    in a different file.  The path, /var/svc/profile/site.xml, is a
-    distinguished location for a site-specific service profile, treated
-    otherwise equivalently to this file.
--->
-<service_bundle type='profile' name='generic_live'
-	 xmlns:xi='http://www.w3.org/2003/XInclude' >
-  <!--
-      svc.startd(1M) services
-  -->
-  <service name='system/boot-archive-update' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/coreadm' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/cron' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/cryptosvc' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/dbus' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/fmd' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/hal' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/identity' version='1' type='service'>
-    <instance name='domain' enabled='true'/>
-  </service>
-  <service name='system/intrd' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/keymap' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/metainit' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/metasync' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/picl' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/postrun' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/sac' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/scheduler' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/system-log' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/utmp' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/zones' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='network/rpc/bind' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/name-service-cache' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/filesystem/zfssnap-roleadd' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/status' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/nlockmgr' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/client' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/server' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/cbd' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nfs/mapid' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/nis/client' version='1' type='service'>
-      <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/physical' version='1' type='service'>
-      <instance name='default' enabled='false'/>
-      <instance name='nwam' enabled='true'/>
-  </service>
-  <service name='network/rpc/gss' version='1' type='service'>
-      <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/rpc/keyserv' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/sendmail-client' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/shares/group' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-    <instance name='zfs' enabled='false'/>
-  </service>
-  <service name='network/ssh' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/smtp' version='1' type='service'>
-    <instance name='sendmail' enabled='false'/>
-  </service>
-  <service name='network/tnctl' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='network/inetd' version='1' type='restarter'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='network/inetd-ugrade' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/dumpadm' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/filesystem/autofs' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-  <service name='system/filesystem/rmvolmgr' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-  <service name='system/power' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-  </service>
-
-  <service name='application/management/sma' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='application/management/seaport' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='application/management/snmpdx' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='application/management/wbem' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <service name='application/print/cleanup' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='application/print/ipp-listener' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='application/print/ppd-cache-update' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='system/basicreg' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='platform/i86pc/kdmconfig' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='application/stosreg' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <service name='network/security/ktkt_warn' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='network/dns/multicast' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='application/pkg/update' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-  <service name='system/avahi-bridge-dsd' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <!--
-      Enable gdm services.
-  -->
-  <service name='application/graphical-login/gdm' version='1' type='service'>
-    <instance name='default' enabled='true' />
-  </service>
-
-  <service name='application/x11/xfs' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
-
-  <!--
-      Make sure GNOME cache services for the live image are all disabled.
-  -->
-  <service name='application/desktop-cache/desktop-mime-cache' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <service name='application/desktop-cache/gconf-cache' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <service name='application/desktop-cache/icon-cache' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <service name='application/desktop-cache/input-method-cache' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <service name='application/desktop-cache/mime-types-cache' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-  <service name='application/desktop-cache/pixbuf-loaders-installer' version='1' type='service'>
-    <instance name='default' enabled='false' />
-  </service>
-
-
-  <!--
-      Enable X11 services
-  -->
-  <service name='application/opengl/ogl-select' version='1' type='service'>
-    <instance name='default' enabled='true'/>
-  </service>
- 
-  <!--
-      Default service instances cloned as live-media instances
-  -->
-  <service name='system/sysidtool' version='1' type='service'>
-    <instance name='system' enabled='false'/>
-    <instance name='live-media' enabled='true'/>
-  </service>
-  <service name='system/filesystem/root-minimal' version='1' type='service'>
-    <instance name='live-media' enabled='true'/>
-  </service>
-  <service name='system/filesystem/root' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-    <instance name='live-media' enabled='true'/>
-    <instance name='net' enabled='false'/>
-  </service>
-  <service name='system/filesystem/usr' version='1' type='service'>
-    <instance name='default' enabled='false'/>
-    <instance name='live-media' enabled='true'/>
-  </service>
-</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/distro_const/slim_cd/slimcd_live.xml	Tue Feb 09 10:49:14 2010 -0800
@@ -0,0 +1,183 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<!--
+    CDDL HEADER START
+   
+    The contents of this file are subject to the terms of the
+    Common Development and Distribution License (the "License").
+    You may not use this file except in compliance with the License.
+   
+    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+    or http://www.opensolaris.org/os/licensing.
+    See the License for the specific language governing permissions
+    and limitations under the License.
+   
+    When distributing Covered Code, include this CDDL HEADER in each
+    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+    If applicable, add the following below this CDDL HEADER, with the
+    fields enclosed by brackets "[]" replaced with your own identifying
+    information: Portions Copyright [yyyy] [name of copyright owner]
+   
+    CDDL HEADER END
+   
+    Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+    Use is subject to license terms.
+
+    Service profile customization for Live CD Image.
+-->
+<service_bundle type='profile' name='live_cd'
+	 xmlns:xi='http://www.w3.org/2003/XInclude' >
+
+  <!--
+      svc.startd(1M) services
+  -->
+
+  <service name='system/hal' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/postrun' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/filesystem/zfssnap-roleadd' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/nfs/server' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/physical' version='1' type='service'>
+      <instance name='default' enabled='false'/>
+      <instance name='nwam' enabled='true'/>
+  </service>
+  <service name='network/rpc/gss' version='1' type='service'>
+      <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/sendmail-client' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/shares/group' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+    <instance name='zfs' enabled='false'/>
+  </service>
+  <service name='network/tnctl' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/inetd-ugrade' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/filesystem/rmvolmgr' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='application/management/sma' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/management/seaport' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/management/snmpdx' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/management/wbem' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/print/cleanup' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/print/ipp-listener' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/print/ppd-cache-update' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='system/basicreg' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='platform/i86pc/kdmconfig' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/stosreg' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='network/security/ktkt_warn' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='network/dns/multicast' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/pkg/update' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='system/avahi-bridge-dsd' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+  <service name='application/x11/xfs' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+
+  <!--
+      Make sure GNOME cache services for the live image are all disabled.
+  -->
+  <service name='application/desktop-cache/desktop-mime-cache' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+
+  <service name='application/desktop-cache/gconf-cache' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+
+  <service name='application/desktop-cache/icon-cache' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+
+  <service name='application/desktop-cache/input-method-cache' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+
+  <service name='application/desktop-cache/mime-types-cache' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+
+  <service name='application/desktop-cache/pixbuf-loaders-installer' version='1' type='service'>
+    <instance name='default' enabled='false' />
+  </service>
+
+  <!--
+      Increase the timeout to avoid error messages for the next 3 services.
+      Default of 30 seconds is not enough when starting from a slow device
+      like a DVD drive.
+  -->
+  <service name='system/dbus' version='1' type='service'>
+    <instance name='default' enabled='true'>
+       <exec_method
+                type='method'
+                name='start'
+		exec='/lib/svc/method/svc-dbus start'
+                timeout_seconds='90'/>
+    </instance>
+  </service>
+
+  <!--
+      Enable gdm services.
+  -->
+  <service name='application/graphical-login/gdm' version='1' type='service'>
+    <instance name='default' enabled='true'>
+       <exec_method
+                type='method'
+                name='start'
+		exec='/lib/svc/method/svc-gdm start'
+                timeout_seconds='120'/>
+    </instance>
+  </service>
+
+  <!--
+      Enable X11 services
+  -->
+  <service name='application/opengl/ogl-select' version='1' type='service'>
+    <instance name='default' enabled='true'>
+       <exec_method
+                type='method'
+                name='start'
+		exec='/lib/svc/method/ogl-select start'
+                timeout_seconds='90'/>
+    </instance>
+  </service>
+</service_bundle>
--- a/usr/src/cmd/distro_const/utils/Makefile	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/utils/Makefile	Tue Feb 09 10:49:14 2010 -0800
@@ -45,6 +45,7 @@
 		boot_archive_configure \
 		boot_archive_strip \
 		post_boot_archive_pkg_image_mod \
+		generic_live.xml \
 		$(PYMODULES)
 
 # Note: PYCMODULES are not delivered.
--- a/usr/src/cmd/distro_const/utils/boot_archive_configure	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/utils/boot_archive_configure	Tue Feb 09 10:49:14 2010 -0800
@@ -19,7 +19,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -111,8 +111,6 @@
 #
 #   MEDIA_DIR: Area where the media is put. (Not used)
 #
-#   MKREPO_FILE: Used to set up the SMF repository
-#
 #   IMG_TYPE_MARKER_FILE: Denotes the type of image.
 #
 # Note: This assumes a populated boot archive area exists at $BA_BUILD.
@@ -120,10 +118,10 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 # Verify argument count
-if [ $# != 7 ] ; then
-	print -u2 "$0: Requires 7 args: Reader socket, pkg_image area,"
+if [ $# != 6 ] ; then
+	print -u2 "$0: Requires 6 args: Reader socket, pkg_image area,"
 	print -u2 "    tmp dir, boot archive build area, media area,"
-	print -u2 "    SMF setup, img_type_file."
+	print -u2 "    img_type_file."
 	exit 1
 fi
 
@@ -147,14 +145,7 @@
 	exit 1
 fi
 
-# Args explicitly specified in manifest for this script.
-MKREPO_FILE=$6
-if [ ! -f $MKREPO_FILE ] ; then
-	print -u2 "$0: SMF Profile $MKREPO_FILE is not valid"
-	exit 1
-fi
-
-IMG_TYPE_MARKER_FILE=$7
+IMG_TYPE_MARKER_FILE=$6
 
 # Define a few commands.
 CD=cd		# Built into the shell
@@ -168,6 +159,8 @@
 MKDIR=/usr/bin/mkdir
 RM=/usr/bin/rm
 TOUCH=/usr/bin/touch
+TR=/usr/bin/tr
+SVCCFG_CMD=$PKG_IMG_PATH/usr/sbin/svccfg
 
 # These commands are not delivered with the core OS.
 MANIFEST_READ=/usr/bin/ManifestRead
@@ -178,6 +171,12 @@
 
 print "Configuring boot archive..."
 
+if [ ! -x $SVCCFG_CMD ] ; then
+        echo "$SVCCFG_CMD is not executable" >& 2
+        exit 1
+fi
+
+
 # Configure devices
 ${BA_BUILD}/${DEVFSADM} -r $BA_BUILD
 
@@ -233,7 +232,42 @@
 echo "opensolaris" > $BA_BUILD/etc/nodename
 
 print "Preloading SMF repository..."
-$MKREPO $BA_BUILD $MKREPO_FILE $PKG_IMG_PATH
+
+$MKREPO $BA_BUILD $PKG_IMG_PATH
+
+export SVCCFG_REPOSITORY=${BA_BUILD}/etc/svc/repository.db
+export LD_LIBRARY_PATH=$PKG_IMG_PATH/lib:$PKG_IMG_PATH/usr/lib:$LD_LIBRARY_PATH
+
+# Apply the list of SMF service profiles specified in the manifest
+PROF_NODE_PATH="distro_constr_params/output_image/boot_archive/\
+smf_service_profile/profile"
+
+SVC_PROFS=`$MANIFEST_READ $MFEST_SOCKET ${PROF_NODE_PATH}/path`
+
+for PROF in `$MANIFEST_READ $MFEST_SOCKET ${PROF_NODE_PATH}/path` ; do
+	USE_SYS_NODE=${PROF_NODE_PATH}"[path=\""${PROF}"\"]/use_build_sys_file"
+	USE_SYS=`$MANIFEST_READ $MFEST_SOCKET ${USE_SYS_NODE}|\
+	    ${TR} '[:upper:]' '[:lower:]'`
+	if [ "${USE_SYS}" != "true" ] ; then
+		DTD_ROOT=${BA_BUILD}
+		SVC_PROF=${PKG_IMG_PATH}/${PROF}
+	else
+		DTD_ROOT="/"
+		SVC_PROF=${PROF}
+	fi
+
+	print "Applying SMF profile: ${SVC_PROF}"
+
+        # Set the DTD reference for every profile applied so that it is
+        # consistent with the profile that's being applied.
+	export SVCCFG_DTD=${DTD_ROOT}/usr/share/lib/xml/dtd/service_bundle.dtd.1
+	${SVCCFG_CMD} apply ${SVC_PROF}
+	if [ "$?" != "0" ] ; then
+		print -u2 "$0: Failed to apply ${SVC_PROF}."
+		exit 1
+	fi
+done
+
 
 $CD $BA_BUILD
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/distro_const/utils/generic_live.xml	Tue Feb 09 10:49:14 2010 -0800
@@ -0,0 +1,203 @@
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<!--
+    CDDL HEADER START
+   
+    The contents of this file are subject to the terms of the
+    Common Development and Distribution License (the "License").
+    You may not use this file except in compliance with the License.
+   
+    You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+    or http://www.opensolaris.org/os/licensing.
+    See the License for the specific language governing permissions
+    and limitations under the License.
+   
+    When distributing Covered Code, include this CDDL HEADER in each
+    file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+    If applicable, add the following below this CDDL HEADER, with the
+    fields enclosed by brackets "[]" replaced with your own identifying
+    information: Portions Copyright [yyyy] [name of copyright owner]
+   
+    CDDL HEADER END
+   
+    Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+    Use is subject to license terms.
+
+    Base service profile customized for all live images.
+-->
+<service_bundle type='profile' name='generic_live'
+	 xmlns:xi='http://www.w3.org/2003/XInclude' >
+  <!--
+      svc.startd(1M) services
+  -->
+  <service name='system/boot-archive-update' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/coreadm' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/cron' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/cryptosvc' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/fmd' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/identity' version='1' type='service'>
+    <instance name='domain' enabled='true'/>
+  </service>
+  <service name='system/intrd' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/keymap' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/metainit' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/metasync' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/picl' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/sac' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/system-log' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/utmp' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='network/rpc/bind' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/name-service-cache' version='1' type='service'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='network/nfs/status' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/nfs/nlockmgr' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/nfs/client' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/nfs/cbd' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/nfs/mapid' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/nis/client' version='1' type='service'>
+      <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/rpc/keyserv' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/ssh' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='network/smtp' version='1' type='service'>
+    <instance name='sendmail' enabled='false'/>
+  </service>
+  <service name='network/inetd' version='1' type='restarter'>
+    <instance name='default' enabled='true'/>
+  </service>
+  <service name='system/dumpadm' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/filesystem/autofs' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+  <service name='system/power' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+  </service>
+
+  <!--
+      Default service instances cloned as live-media instances
+  -->
+  <service name='system/sysidtool' version='1' type='service'>
+    <instance name='system' enabled='false'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+    <instance name='live-media' enabled='true'/>
+    <instance name='net'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+  </service>
+  <service name='system/filesystem/root-minimal' version='1' type='service'>
+    <instance name='live-media' enabled='true'/>
+  </service>
+  <service name='system/filesystem/root' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+    <instance name='live-media' enabled='true'/>
+    <instance name='net' enabled='false'/>
+  </service>
+  <service name='system/filesystem/usr' version='1' type='service'>
+    <instance name='default' enabled='false'/>
+    <instance name='live-media' enabled='true'/>
+  </service>
+
+  <!--
+      Dummy out start methods for services we need to run, but as no-ops
+  -->
+  <service name='system/boot-archive' version='1' type='service'>
+    <instance name='default'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+  </service>
+  <service name='system/manifest-import' version='1' type='service'>
+    <instance name='default'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+  </service>
+  <service name='system/rmtmpfiles' version='1' type='service'>
+    <instance name='default'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+  </service>
+  <service name='application/font/fc-cache' version='1' type='service'>
+    <instance name='default'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+  </service>
+  <service name='system/scheduler' version='1' type='service'>
+    <instance name='default' enabled='true'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+  </service>
+  <service name='system/zones' version='1' type='service'>
+    <instance name='default' enabled='true'>
+       <exec_method
+                type='method'
+                name='start'
+                exec=':true'/>
+    </instance>
+  </service>
+</service_bundle>
--- a/usr/src/cmd/distro_const/utils/mkrepo	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/distro_const/utils/mkrepo	Tue Feb 09 10:49:14 2010 -0800
@@ -21,23 +21,22 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
 # 0.  Initialization.
 
-[ $# != 3 ] && echo "Usage: mkrepo <rootdir> <special_profile> <pkg_img_path>" \
+[ $# != 2 ] && echo "Usage: mkrepo <rootdir> <pkg_img_path>" \
 && exit 1
 
 ROOTDIR=$1
-SPECIAL_PROFILE=$2
 SVCCFG_DTD=${ROOTDIR}/usr/share/lib/xml/dtd/service_bundle.dtd.1
 SVCCFG_REPOSITORY=${ROOTDIR}/etc/svc/repository.db
 
 export SVCCFG_DTD SVCCFG_REPOSITORY
 
-PKG_IMG_PATH=$3
+PKG_IMG_PATH=$2
 SVCCFG_CMD=$PKG_IMG_PATH/usr/sbin/svccfg
 if [ ! -x $PKG_IMG_PATH/usr/sbin/svccfg ] ; then
 	echo "$PKG_IMG_PATH/usr/sbin/svccfg is not executable" >& 2
@@ -49,13 +48,6 @@
 X=
 [ -f /lib/svc/share/smf_include.sh ] || exit 1
 
-svccfg_apply () {
-	$X $SVCCFG_CMD apply $1
-	if [ $? -ne 0 ]; then
-		echo "WARNING: svccfg apply $1 failed" | tee /dev/msglog
-	fi
-}
-
 svccfg_import () {
 	$X $SVCCFG_CMD import $1 2>>/tmp/manifest_import.$$
 	if [ $? -ne 0 ]; then
@@ -119,53 +111,4 @@
 	rm -f /tmp/manifest_import.$$
 fi
 
-#
-# 3.  Profile application.  We must create the platform profile upon
-# first boot, as we may be a diskless client of a platform or
-# architecture distinct from our NFS server.
-#
-svccfg_apply ${ROOTDIR}/var/svc/profile/generic_limited_net.xml
-
-if [ ! -f ${ROOTDIR}/var/svc/profile/platform.xml ]; then
-	this_karch=`uname -m`
-	this_plat=`uname -i`
-
-	if [ -f ${ROOTDIR}/var/svc/profile/platform_$this_plat.xml ]; then
-		platform_profile=platform_$this_plat.xml
-	elif [ -f ${ROOTDIR}/var/svc/profile/platform_$this_karch.xml ]; then
-		platform_profile=platform_$this_karch.xml
-	else
-		platform_profile=platform_none.xml
-	fi
-
-	(cd ${ROOTDIR}/var/svc/profile; ln -s $platform_profile platform.xml)
-fi
-
-svccfg_apply ${ROOTDIR}/var/svc/profile/platform.xml
-
-# Apply Live environment modifications
-svccfg_apply ${SPECIAL_PROFILE}
-
-# Apply name service profile
-svccfg_apply ${ROOTDIR}/var/svc/profile/ns_files.xml
-
-# Dummy out start methods for services we need to run, but as no-ops
-$SVCCFG_CMD -s system/boot-archive setprop start/exec=:true
-$SVCCFG_CMD -s system/manifest-import setprop start/exec=:true
-$SVCCFG_CMD -s system/rmtmpfiles setprop start/exec=:true
-$SVCCFG_CMD -s system/sysidtool:net setprop start/exec=:true
-$SVCCFG_CMD -s system/sysidtool:system setprop start/exec=:true
-$SVCCFG_CMD -s system/scheduler setprop start/exec=:true
-$SVCCFG_CMD -s system/zones setprop start/exec=:true
-$SVCCFG_CMD -s application/font/fc-cache setprop start/exec=:true
-
-#
-# Increase timeout to avoid error messages. Default
-# of 30 seconds is not enough for some services when
-# starting from a slow device like a DVD drive.
-#
-$SVCCFG_CMD -s system/dbus setprop start/timeout_seconds=90
-$SVCCFG_CMD -s application/opengl/ogl-select setprop start/timeout_seconds=90
-$SVCCFG_CMD -s application/graphical-login/gdm setprop start/timeout_seconds=120
-
 exit 0
--- a/usr/src/cmd/slim-install/svc/live_fs_include.sh	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/slim-install/svc/live_fs_include.sh	Tue Feb 09 10:49:14 2010 -0800
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -147,3 +147,31 @@
 		#/usr/bin/crle $CRLE_OPTS
 	fi
 }
+
+#
+# The platform profile must be created and applied at boot time, based
+# on the architecture of the machine
+#
+apply_platform_profile()
+{
+	if [ ! -f /var/svc/profile/platform.xml ]; then
+		this_karch=`uname -m`
+		this_plat=`uname -i`
+
+		if [ -f /var/svc/profile/platform_$this_plat.xml ]; then
+			platform_profile=platform_$this_plat.xml
+		elif [ -f /var/svc/profile/platform_$this_karch.xml ]; then
+			platform_profile=platform_$this_karch.xml
+		else
+			platform_profile=platform_none.xml
+		fi
+	fi
+
+        (cd /var/svc/profile; ln -s $platform_profile platform.xml)
+
+	/usr/sbin/svccfg apply /var/svc/profile/platform.xml
+	if [ $? -ne 0 ]; then
+		echo "Failed to apply /var/svc/profile/platform.xml" > /dev/msglog
+	fi
+
+}
--- a/usr/src/cmd/slim-install/svc/media-fs-root	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/slim-install/svc/media-fs-root	Tue Feb 09 10:49:14 2010 -0800
@@ -178,6 +178,18 @@
 	sun4u_libc_psr_mount 
 fi
 
+#
+# All SMF services are imported and sevice profiles are applied to the
+# boot archive during image construction time.  However, the link
+# for the platform.xml service profile is not created because
+# we are unable to determine the platform on which the image will
+# be booted on during build time.
+#
+# The link for platform.xml file must be created during boot time
+# depending on platform type.
+#
+apply_platform_profile
+
 /usr/bin/rm -f /etc/svc/repository-boot*
 
 # Mount opt
--- a/usr/src/cmd/slim-install/svc/net-fs-root	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/cmd/slim-install/svc/net-fs-root	Tue Feb 09 10:49:14 2010 -0800
@@ -20,7 +20,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -328,6 +328,18 @@
 	sun4u_libc_psr_mount 
 fi
 
+#
+# All SMF services are imported and sevice profiles are applied to the
+# boot archive during image construction time.  However, the link
+# for the platform.xml service profile is not created because
+# we are unable to determine the platform on which the image will
+# be booted on during build time.
+#
+# The link for platform.xml file must be created during boot time
+# depending on platform type.
+#
+apply_platform_profile
+
 /usr/bin/rm -f /etc/svc/repository-boot*
 
 # Mount opt
--- a/usr/src/pkgdefs/SUNWdistro-const/prototype_com	Tue Feb 09 12:45:59 2010 -0800
+++ b/usr/src/pkgdefs/SUNWdistro-const/prototype_com	Tue Feb 09 10:49:14 2010 -0800
@@ -88,7 +88,7 @@
 d none usr/share/distro_const/slim_cd 0755 root bin
 d none usr/share/distro_const/vmc 0755 root bin
 f none usr/share/distro_const/auto_install/ai_boot_archive_configure 0555 root bin
-f none usr/share/distro_const/auto_install/ai_generic_live.xml 0444 root sys
+f none usr/share/distro_const/auto_install/ai_live.xml 0444 root sys
 f none usr/share/distro_const/auto_install/ai_post_boot_archive_pkg_image_mod 0555 root bin
 f none usr/share/distro_const/auto_install/ai_pre_boot_archive_pkg_image_mod 0555 root bin
 f none usr/share/distro_const/auto_install/ai_plat_setup.py 0555 root bin
@@ -110,10 +110,11 @@
 f none usr/share/distro_const/mkrepo 0555 root bin
 f none usr/share/distro_const/post_boot_archive_pkg_image_mod 0555 root bin
 f none usr/share/distro_const/pre_boot_archive_pkg_image_mod.py 0555 root bin
+f none usr/share/distro_const/generic_live.xml 0444 root sys
 f none usr/share/distro_const/slim_cd/all_lang_slim_cd_x86.xml 0444 root sys
 f none usr/share/distro_const/slim_cd/slimcd_boot_archive_configure 0555 root bin
 f none usr/share/distro_const/slim_cd/slimcd_gen_cd_content 0555 root bin
-f none usr/share/distro_const/slim_cd/slimcd_generic_live.xml 0444 root sys
+f none usr/share/distro_const/slim_cd/slimcd_live.xml 0444 root sys
 f none usr/share/distro_const/slim_cd/slimcd_iso.sort 0444 root sys
 f none usr/share/distro_const/slim_cd/slimcd_post_boot_archive_pkg_image_mod 0555 root bin
 f none usr/share/distro_const/slim_cd/slimcd_pre_boot_archive_pkg_image_mod 0555 root bin