Mercurial > illumos > illumos-gate
changeset 10900:bcc724d0f0a0
6893768 need a way to test S10 BFU images within the zone
author | <gerald.jelinek@sun.com> |
---|---|
date | Wed, 28 Oct 2009 12:54:00 -0600 |
parents | b4dce54e32ff |
children | fb88c4bfd3ae |
files | usr/src/lib/brand/solaris10/zone/common.ksh usr/src/lib/brand/solaris10/zone/config.xml usr/src/lib/brand/solaris10/zone/image_install.ksh |
diffstat | 3 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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. #
--- 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 @@ <user_cmd>/usr/bin/getent passwd %u</user_cmd> <install>/usr/lib/brand/solaris10/image_install %z %R</install> - <installopts>a:d:psuv</installopts> + <installopts>a:d:Fpsuv</installopts> <boot>/usr/lib/brand/solaris10/s10_boot %z %R</boot> <sysboot>/usr/lib/brand/solaris10/prestate %z %R 2 0</sysboot> <halt></halt>
--- 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