#!/bin/sh

# Copyright (c) 2010-2013, by Broadcom, Inc.
# All Rights Reserved.

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

DRV=bge

REM_DRV=/usr/sbin/rem_drv

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

${REM_DRV} ${DRV_FLAGS} ${DRV}

exit 0

