#!/bin/sh

# Copyright 2014 QLogic Corporation
# The contents of this file are subject to the terms of the
# QLogic End User License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the License at
# http://www.qlogic.com/Resources/Documents/DriverDownloadHelp/
# QLogic_End_User_Software_License.txt
# See the License for the specific language governing permissions
# and limitations under the License.


PATH="${PKG_INSTALL_ROOT}/usr/bin:${PKG_INSTALL_ROOT}/usr/sbin:${PATH}"
export PATH 

DRV=bnx

REM_DRV=/usr/sbin/rem_drv

if [ "${PKG_INSTALL_ROOT}" = "" -o "${PKG_INSTALL_ROOT}" = "/" ]; then
    # On a running system, modify the system files and attach the driver.
    REM_DRV_FLAGS=""
else
    # On a client, modify the system files relative to PKG_INSTALL_ROOT
    REM_DRV_FLAGS="-b ${PKG_INSTALL_ROOT}"
fi

${REM_DRV} ${REM_DRV_FLAGS} ${DRV}

exit 0

