summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorkucharsk <none@none>2007-04-26 06:40:38 -0700
committerkucharsk <none@none>2007-04-26 06:40:38 -0700
commitb41ec1e64f218976aac7f88d4e966c36b326a3c2 (patch)
tree8f361ff47a9e760cd695ce7c63b0d8da4916d357 /usr/src
parent9c1751294cd1ff9c27007f40ee6aacc943076cbf (diff)
downloadillumos-joyent-b41ec1e64f218976aac7f88d4e966c36b326a3c2.tar.gz
6547048 BrandZ installer does not properly identify Intel i686 processors that are not Pentium 4 variants
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/brand/lx/zone/lx_distro_install.ksh27
-rw-r--r--usr/src/lib/brand/lx/zone/lx_install.ksh23
2 files changed, 35 insertions, 15 deletions
diff --git a/usr/src/lib/brand/lx/zone/lx_distro_install.ksh b/usr/src/lib/brand/lx/zone/lx_distro_install.ksh
index eb89cfe66b..ea4bcf9286 100644
--- a/usr/src/lib/brand/lx/zone/lx_distro_install.ksh
+++ b/usr/src/lib/brand/lx/zone/lx_distro_install.ksh
@@ -333,20 +333,21 @@ find_packages()
if [[ -z $archs ]]; then
procinfo=$(LC_ALL=C psrinfo -vp | grep family)
- if [[ $procinfo = *AuthenticAMD* ]]; then
- #
- # Check for AMD athlon compatibility. The decision to
- # have athlon files checked for before i686 files is
- # what Linux does.
- #
- [[ $procinfo = *" family 6 "* ||
- $procinfo = *" family 15 "* ]] &&
+ #
+ # Check for additional processor capabilities
+ #
+ if [[ "$procinfo" = *" family 6 "* ||
+ "$procinfo" = *" family 15 "* ]]; then
+ if [[ "$procinfo" = *AuthenticAMD* ]]; then
+ #
+ # Linux gives "athlon" packages precedence
+ # over "i686" packages, so duplicate that
+ # here.
+ #
archs="athlon i686"
- elif [[ "$procinfo" = *GenuineIntel* ]]; then
- #
- # Check for i686 compatibility
- #
- [[ "$procinfo" = *" family 15 "* ]] && archs="i686"
+ else
+ archs="i686"
+ fi
fi
archs="$archs i586 i486 i386 noarch"
diff --git a/usr/src/lib/brand/lx/zone/lx_install.ksh b/usr/src/lib/brand/lx/zone/lx_install.ksh
index 0ea76ea8ee..5f6f22ef25 100644
--- a/usr/src/lib/brand/lx/zone/lx_install.ksh
+++ b/usr/src/lib/brand/lx/zone/lx_install.ksh
@@ -26,8 +26,9 @@
# ident "%Z%%M% %I% %E% SMI"
#
-# Restrict executables to /bin, /usr/bin and /usr/sfw/bin
-PATH=/bin:/usr/bin:/usr/sfw/bin
+# Restrict executables to /bin, /usr/bin, /usr/sbin and /usr/sfw/bin
+PATH=/bin:/usr/bin:/usr/sbin:/usr/sfw/bin
+
export PATH
# Setup i18n output
@@ -60,6 +61,9 @@ verbose()
[[ -n $logfile ]] && [[ -n $verbose_mode ]] && echo "$@" >&2
}
+unsupported_cpu=\
+$(gettext "ERROR: Cannot install branded zone: processor must be %s-compatible")
+
cmd_not_found=$(gettext "Required command '%s' cannot be found!")
cmd_not_exec=$(gettext "Required command '%s' not executable!")
zone_initfail=$(gettext "Attempt to initialize zone '%s' FAILED.")
@@ -337,6 +341,21 @@ if [[ -n $silent_mode && -n $verbose_mode ]]; then
exit $int_code
fi
+#
+# Validate that we're running on a i686-compatible CPU; abort the zone
+# installation now if we're not.
+#
+procinfo=$(LC_ALL=C psrinfo -vp | grep family)
+
+#
+# All x86 processors in CPUID families 6 or 15 should be i686-compatible,
+# assuming third party processor vendors follow AMD and Intel's lead.
+#
+if [[ "$procinfo" != *" x86 "* ]] ||
+ [[ "$procinfo" != *" family 6 "* && "$procinfo" != *" family 15 "* ]] ; then
+ screenlog "$unsupported_cpu" "i686"
+ exit $ZONE_SUBPROC_NOTCOMPLETE
+fi
if [[ -n $install_src ]]; then
#