#! /sbin/sh
##############
# Product: SwitchOverUX
# Fileset: SWITCHOVER-KRN
# configure
# @(#) $Revision: 1.2.98.1 $
##############
#
# (c) Copyright Hewlett-Packard Company, 1994
#
#####################

# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT,
# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils.

UTILS=/usr/lbin/sw/control_utils
if [[ ! -f $UTILS ]]
then
    print "ERROR:   Cannot find the sh functions library $UTILS."
    exit $FAILURE
fi
. $UTILS

exitval=$SUCCESS                # Anticipate success

########################################################
#						       #
# If configuring a diskless client, or a disk that had #
# been mounted as an alternate root during swinstall,  #
# perform all necessary  kernel modifications.	       #
#						       #
########################################################

if [[ -n "${SW_DEFERRED_KERNBLD}" ]]
then

    ##########################################
    #                                        #
    # Place any drivers into /stand/system   #
    #                                        #
    ##########################################
    
    mod_systemfile $SW_SYSTEM_FILE_PATH -a "switch"
    if [[ $? -ne 0 ]]
    then
        print "ERROR:   Cannot update $SW_SYSTEM_FILE_PATH to"
        print "         include switch (SWITCHOVER-KRN functionality)."
        exitval=$FAILURE 
    fi
    
fi	# end of if [[ -n "${SW_DEFERRED_KERNBLD}" ]]

#
# Fin.
#

exit $exitval
