1*2334Ssetje#!/sbin/sh
2*2334Ssetje#
3*2334Ssetje# CDDL HEADER START
4*2334Ssetje#
5*2334Ssetje# The contents of this file are subject to the terms of the
6*2334Ssetje# Common Development and Distribution License (the "License").
7*2334Ssetje# You may not use this file except in compliance with the License.
8*2334Ssetje#
9*2334Ssetje# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*2334Ssetje# or http://www.opensolaris.org/os/licensing.
11*2334Ssetje# See the License for the specific language governing permissions
12*2334Ssetje# and limitations under the License.
13*2334Ssetje#
14*2334Ssetje# When distributing Covered Code, include this CDDL HEADER in each
15*2334Ssetje# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*2334Ssetje# If applicable, add the following below this CDDL HEADER, with the
17*2334Ssetje# fields enclosed by brackets "[]" replaced with your own identifying
18*2334Ssetje# information: Portions Copyright [yyyy] [name of copyright owner]
19*2334Ssetje#
20*2334Ssetje# CDDL HEADER END
21*2334Ssetje#
22*2334Ssetje#
23*2334Ssetje# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*2334Ssetje# Use is subject to license terms.
25*2334Ssetje#
26*2334Ssetje# ident	"%Z%%M%	%I%	%E% SMI"
27*2334Ssetje
28*2334Ssetje. /lib/svc/share/smf_include.sh
29*2334Ssetje. /lib/svc/share/fs_include.sh
30*2334Ssetje
31*2334SsetjeUPDATEFILE=/etc/svc/volatile/boot_archive_needs_update
32*2334Ssetje
33*2334Ssetjesmf_is_globalzone || exit $SMF_EXIT_OK
34*2334Ssetje
35*2334Ssetje# no boot-archive on sparc...yet
36*2334Ssetje#
37*2334Ssetjeif [ `uname -p` = "sparc" ]; then
38*2334Ssetje        exit $SMF_EXIT_OK
39*2334Ssetjefi
40*2334Ssetje
41*2334Ssetje# get rid of transient reboot entry in GRUB menu
42*2334Ssetjeif [ -f /stubboot/boot/grub/menu.lst ]; then
43*2334Ssetje	/sbin/bootadm -m update_temp -R /stubboot
44*2334Ssetjeelse
45*2334Ssetje	/sbin/bootadm -m update_temp
46*2334Ssetjefi
47*2334Ssetje
48*2334Ssetjeif [ -f $UPDATEFILE ] || [ -f /reconfigure ]; then
49*2334Ssetje	/usr/sbin/rtc -c > /dev/null 2>&1
50*2334Ssetje	/sbin/bootadm update-archive
51*2334Ssetje	rm -f $UPDATEFILE
52*2334Ssetjefi
53*2334Ssetje
54*2334Ssetjeexit $SMF_EXIT_OK
55