#!/usr/sbin/sh # # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # . /lib/svc/share/smf_include.sh . /lib/svc/share/fs_include.sh UPDATEFILE=/.boot_loader_update_required smf_assert_globalzone # Update the boot loader if a deferred boot loader update is required. # if [ -f $UPDATEFILE ]; then /usr/sbin/bootadm install-bootloader if [ $? = 0 ]; then /bin/rm -f $UPDATEFILE else # Failure to update the boot loader is a fatal # error. We must interrupt the boot process to # inform the user that the boot loader could not # be installed so that they can investigate. No # automated recovery is possible at this point, # and it's essential that the boot loader be updated # before the user can proceed to do things that # might make the system unbootable if the boot loader # is not updated (i.e. upgrade the root zfs pool to # a zpool version later than that supported by the # existing (installed) boot loader). exit $SMF_EXIT_ERR_FATAL fi fi exit $SMF_EXIT_OK