boot-archive revision 6927f468b0af7710df000f6b16f6ee413e1e3007
8b91dcac0e1ef7796c72d16b0962267313cac486jerenkrantz# CDDL HEADER START
8b91dcac0e1ef7796c72d16b0962267313cac486jerenkrantz# The contents of this file are subject to the terms of the
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# Common Development and Distribution License (the "License").
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# You may not use this file except in compliance with the License.
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# See the License for the specific language governing permissions
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# and limitations under the License.
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb# When distributing Covered Code, include this CDDL HEADER in each
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# If applicable, add the following below this CDDL HEADER, with the
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb# fields enclosed by brackets "[]" replaced with your own identifying
574f6ff9ee80ef4f772649c5c8319b764a8abe42jerenkrantz# information: Portions Copyright [yyyy] [name of copyright owner]
574f6ff9ee80ef4f772649c5c8319b764a8abe42jerenkrantz# CDDL HEADER END
6d7d70dbda8e461d87f2d41e323755496ae3ebc7trawick# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22a25f3393393b781e214f4abef17950bcb8bbe3jerenkrantz# Use is subject to license terms.
22a25f3393393b781e214f4abef17950bcb8bbe3jerenkrantz# ident "%Z%%M% %I% %E% SMI"
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe# Check the boot archive content against root filesystem.
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe# Return failure if they differ.
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb# no boot-archive on sparc...yet
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb# Make sure we return failure only once. If user choose to ignore
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb# error, we return success to permit boot to continue. The boot
52df98b165194a0ad68885f49f81fdaf56ece568wrowe# archive will be updated on the subsequent shutdown.
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbbif [ -f "${ERRORFILE}" ]; then
7e44dd5082cd865068285e8f915bb5f045e0bb80lars# Now check the archive.
44a4ee1140769173da7bc2b42d1a686e3260ad84wroweif [ $? = 0 ]; then
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantzcecho "WARNING - The following files in / differ from the boot archive:"
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantz/sbin/bootadm update-archive -vnC > /dev/msglog 2> /dev/null
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantzcecho "The recommended action is to reboot and select \"Solaris failsafe\""
976501adbc040220270f7d1d77c4b8373033be69wrowececho "option from the boot menu. Then follow prompts to update the"
976501adbc040220270f7d1d77c4b8373033be69wrowececho "To continue booting at your own risk, clear the service:"