Attached is the hg diff output from the fixes for 17995, 17996 and 17997
which are the required changes for zone creation/clone/p2v to support
the new sysconfig framework.   The changes handle both the old and new
frameworks switching based on the upcoming unconfig milestone being online.

The Zone Test Suite has passed with these changes.

Thanks,
Susan

diff -r 5f86408f56d1 -r e4f15d0d13c5 src/brand/common.ksh
--- a/src/brand/common.ksh      Thu Apr 28 16:11:08 2011 -0700
+++ b/src/brand/common.ksh      Fri Apr 29 10:56:29 2011 -0700
@@ -242,8 +242,19 @@
        ZONE_IS_MOUNTED=1
        zoneadm -z $ZONENAME mount -f || fatal "$e_badmount"
 
-       zlogin -S $ZONENAME /usr/sbin/sys-unconfig -R /a \
-           </dev/null >/dev/null 2>&1
+       # If unconfig service exists and is online then use sysconfig
+       SC_ONLINE=$(svcprop -p restarter/state \
+           svc:/milestone/unconfig:default 2> /dev/null)
+       if (( $? == 0 )) && [[ $SC_ONLINE == "online" ]]; then
+               zlogin -S $ZONENAME "export _UNCONFIG_ALT_ROOT=/a; \
+                   /usr/sbin/sysconfig unconfigure -g system; \
+                   export _UNCONFIG_ALT_ROOT= ;" \
+                   </dev/null >/dev/null 2>&1
+       else
+               zlogin -S $ZONENAME /usr/sbin/sys-unconfig -R /a \
+                   </dev/null >/dev/null 2>&1
+       fi
+
        if (( $? != 0 )); then
                error "$e_unconfig"
                failed=1
diff -r 5f86408f56d1 -r e4f15d0d13c5 src/brand/pkgcreatezone
--- a/src/brand/pkgcreatezone   Thu Apr 28 16:11:08 2011 -0700
+++ b/src/brand/pkgcreatezone   Fri Apr 29 10:56:29 2011 -0700
@@ -560,6 +560,15 @@
 pkglist="$pkglist \
        pkg:///text/doctools"
 
+# 
+# packages needed for sysconfig in zone
+#
+pkglist="$pkglist \
+       pkg:///system/install
+       pkg:///system/install/configuration
+       pkg:///system/library/install
+       pkg:///security/sudo"
+
 #
 # Add in any extra packages requested by the user.
 #
@@ -590,13 +599,25 @@
 printf "$m_done\n"
 
 #
-# Make sure sysidtools run; we manually poke in the SSH action
-# so that we get an SSH key.  Yes, this is seriously borken.
-# See http://defect.opensolaris.org/bz/show_bug.cgi?id=741
+# If unconfig service exists and is online then copy in enable_sci.xml
+# sysconfig file to trigger config cycle on boot of zone.
 #
-printf "$m_more_brokenness\n"
-/usr/sbin/sysidconfig -b $ZONEROOT -a /lib/svc/method/sshd
-touch $ZONEROOT/etc/.UNCONFIGURED
+SC_ONLINE=$(svcprop -p restarter/state \
+    svc:/milestone/unconfig:default 2> /dev/null)
+if (( $? == 0 )) && [[ $SC_ONLINE == "online" ]]; then
+       cp /usr/share/auto_install/sc_profiles/enable_sci.xml \
+           $ZONEROOT/etc/svc/profile/site
+else
+       #
+       # Make sure sysidtools run; we manually poke in the SSH action
+       # so that we get an SSH key.  Yes, this is seriously borken.
+       # See http://defect.opensolaris.org/bz/show_bug.cgi?id=741
+       #
+       printf "$m_more_brokenness\n"
+       /usr/sbin/sysidconfig -b $ZONEROOT -a /lib/svc/method/sshd
+
+       touch $ZONEROOT/etc/.UNCONFIGURED
+fi
 
 #
 # Labeled zones need to be able to modify /etc/gconf files, when gnome
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to