summaryrefslogtreecommitdiff
path: root/usr/src/cmd/boot
diff options
context:
space:
mode:
authorJoshua M. Clulow <josh@sysmgr.org>2021-03-09 22:10:34 -0800
committerJoshua M. Clulow <josh@sysmgr.org>2021-03-09 22:11:24 -0800
commitf6c47fdeea63a9c5d1abefdffb93d3f87e12b7d0 (patch)
tree2132819ab094c681a812dcec50367463f1f172ac /usr/src/cmd/boot
parent2587b3a0593a431a99cc2dc78bf1034e672a35e2 (diff)
downloadillumos-gate-f6c47fdeea63a9c5d1abefdffb93d3f87e12b7d0.tar.gz
13605 ramdisk systems have no boot_archive
Reviewed by: Andy Fiddaman <andy@omnios.org> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/boot')
-rw-r--r--usr/src/cmd/boot/scripts/boot-archive-update.ksh10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/cmd/boot/scripts/boot-archive-update.ksh b/usr/src/cmd/boot/scripts/boot-archive-update.ksh
index deae20e814..24810a22db 100644
--- a/usr/src/cmd/boot/scripts/boot-archive-update.ksh
+++ b/usr/src/cmd/boot/scripts/boot-archive-update.ksh
@@ -23,6 +23,7 @@
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
+# Copyright 2021 Oxide Computer Company
#
. /lib/svc/share/smf_include.sh
@@ -30,7 +31,14 @@
UPDATEFILE=/etc/svc/volatile/boot_archive_safefile_update
-smf_is_globalzone || exit $SMF_EXIT_OK
+if smf_is_nonglobalzone || smf_root_is_ramdisk; then
+ #
+ # Boot archives only exist in the global zone of persistent root
+ # systems, but this is either a non-global zone or a system booted from
+ # a ramdisk image.
+ #
+ exit $SMF_EXIT_OK
+fi
if [ `uname -p` = "i386" ]; then
# on x86 get rid of transient reboot entry in the GRUB menu