#!/sbin/sh
# Product: STREAMS
# Fileset: STREAMS-KERN 
# postinstall 
# @(#) $Revision: 1.4.98.1 $
#
# (c) Copyright Hewlett-Packard Company 1993
#
###############################################################

    set -a                      # Export all vars
    exitval=0                   # Anticipate success

    UTILS="/usr/lbin/sw/control_utils"
    if [[ ! -f $UTILS ]]
    then
        echo "ERROR:   Cannot find $UTILS"
        exit 1
    fi
    . $UTILS

################################################################################
#
# Modify the kernel gen file to include the
# hpstreams subsystem and standard streams drivers and modules

    if [[ -z $SW_DEFERRED_KERNBLD ]]
    then

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a hpstreams
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"hpstreams\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a clone
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"clone\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a strlog
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"strlog\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a sad
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"sad\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a echo
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"echo\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a sc
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"sc\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a timod
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"timod\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a tirdwr
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"tirdwr\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a pipedev
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"pipedev\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a pipemod
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"pipemod\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi

        mod_systemfile ${SW_SYSTEM_FILE_PATH} -a ffs
	retval=$?
	if [[ $retval -ne 0 ]]
	then
		echo "ERROR:   Could not enter \"ffs\" in the ${SW_SYSTEM_FILE_PATH}"
		exitval=1
	fi
    fi

exit $exitval
