export_modules revision 037f4c44a9ef4e458f46b264aebd12df049b0f0c
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# Create a tar archive containing the sources of the vboxdrv kernel module
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# Copyright (C) 2007 Sun Microsystems, Inc.
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# This file is part of VirtualBox Open Source Edition (OSE), as
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# available from http://www.virtualbox.org. This file is free software;
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# you can redistribute it and/or modify it under the terms of the GNU
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# General Public License (GPL) as published by the Free Software
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# Foundation, in version 2 as it comes in the "COPYING" file of the
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# The contents of this file may alternatively be used under the terms
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# of the Common Development and Distribution License Version 1.0
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# VirtualBox OSE distribution, in which case the provisions of the
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# CDDL are applicable instead of those of the GPL.
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# You may elect to license modified versions of this file under the
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# terms and conditions of either the GPL or the CDDL or both.
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# Clara, CA 95054 USA or visit http://www.sun.com if you need
d2ec54f7875f7e05edd56195adbeb593c947763fphitran# additional information or have any questions.
d2ec54f7875f7e05edd56195adbeb593c947763fphitranif [ -z "$1" ]; then
d2ec54f7875f7e05edd56195adbeb593c947763fphitran echo "Usage: $0 <filename.tar.gz> [--without-hardening]"
d2ec54f7875f7e05edd56195adbeb593c947763fphitran echo " Export VirtualBox kernel modules to <filename.tar.gz>"
VBOX_VERSION_MAJOR=`sed -e "s/^ *VBOX_VERSION_MAJOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Config.kmk`
VBOX_VERSION_MINOR=`sed -e "s/^ *VBOX_VERSION_MINOR *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Config.kmk`
VBOX_VERSION_BUILD=`sed -e "s/^ *VBOX_VERSION_BUILD *= \+\([0-9]\+\)/\1/;t;d" $PATH_ROOT/Config.kmk`
sed -e "s;_VERSION_;$VBOX_VERSION_STRING;g" < $PATH_LINUX/build_in_tmp > $PATH_TMP/vboxdrv/build_in_tmp
sed -e "s;_VERSION_;$VBOX_VERSION_STRING;g" < $PATH_VBOXDRV/linux/dkms.conf > $PATH_TMP/vboxdrv/dkms.conf
if [ -n "$VBOX_WITH_HARDENING" ]; then
sed -e "s;_VERSION_;$VBOX_VERSION_STRING;g" < $PATH_LINUX/build_in_tmp > $PATH_TMP/vboxnetflt/build_in_tmp
sed -e "s;_VERSION_;$VBOX_VERSION_STRING;g" < $PATH_VBOXNET/linux/dkms.conf > $PATH_TMP/vboxnetflt/dkms.conf
if [ -n "$VBOX_WITH_HARDENING" ]; then