# HG changeset patch # User # Date 1256756040 21600 # Node ID bcc724d0f0a083e13e76cb3279d053e918b3fade # Parent b4dce54e32ff6d4b65606e4de2e22f7c91669a55 6893768 need a way to test S10 BFU images within the zone diff -r b4dce54e32ff -r bcc724d0f0a0 usr/src/lib/brand/solaris10/zone/common.ksh --- a/usr/src/lib/brand/solaris10/zone/common.ksh Wed Oct 28 13:39:45 2009 -0500 +++ b/usr/src/lib/brand/solaris10/zone/common.ksh Wed Oct 28 12:54:00 2009 -0600 @@ -32,6 +32,7 @@ # Use the ipkg-brand ZFS property for denoting the zone root's active dataset. PROP_ACTIVE="org.opensolaris.libbe:active" +w_sanity_detail=$(gettext " WARNING: Skipping image sanity checks.") f_sanity_detail=$(gettext "Missing %s at %s") f_sanity_sparse=$(gettext "Is this a sparse zone image? The image must be whole-root.") f_sanity_vers=$(gettext "The image release version must be 10 (got %s), the zone is not usable on this system.") @@ -81,6 +82,16 @@ fi done + if (( $res != 0 )); then + log "$sanity_fail" + fatal "$install_fail" "$ZONENAME" + fi + + if [[ "$SANITY_SKIP" == 1 ]]; then + log "$w_sanity_detail" + return + fi + # # Check image release to be sure its S10. # diff -r b4dce54e32ff -r bcc724d0f0a0 usr/src/lib/brand/solaris10/zone/config.xml --- a/usr/src/lib/brand/solaris10/zone/config.xml Wed Oct 28 13:39:45 2009 -0500 +++ b/usr/src/lib/brand/solaris10/zone/config.xml Wed Oct 28 12:54:00 2009 -0600 @@ -36,7 +36,7 @@ /usr/bin/getent passwd %u /usr/lib/brand/solaris10/image_install %z %R - a:d:psuv + a:d:Fpsuv /usr/lib/brand/solaris10/s10_boot %z %R /usr/lib/brand/solaris10/prestate %z %R 2 0 diff -r b4dce54e32ff -r bcc724d0f0a0 usr/src/lib/brand/solaris10/zone/image_install.ksh --- a/usr/src/lib/brand/solaris10/zone/image_install.ksh Wed Oct 28 13:39:45 2009 -0500 +++ b/usr/src/lib/brand/solaris10/zone/image_install.ksh Wed Oct 28 12:54:00 2009 -0600 @@ -133,8 +133,9 @@ # unset unconfig_zone unset preserve_zone +unset SANITY_SKIP -while getopts "a:d:pr:suv" opt +while getopts "a:d:Fpr:suv" opt do case "$opt" in a) @@ -151,6 +152,7 @@ inst_type="directory" install_media="$OPTARG" ;; + F) SANITY_SKIP=1;; p) preserve_zone="-p";; r) if [[ -n "$inst_type" ]]; then