- Update vboxconfig.sh to fix problems noted in bsc#1042726
Disable pae build for 32-bit kernels. Added missing commands to keep mkinitrd from being called twice during installation of host kernel modules. bsc#105248. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=359
This commit is contained in:
committed by
Git OBS Bridge
parent
c3af46ed4d
commit
c6ad50c18b
@@ -12,22 +12,30 @@ INCLUDE="/lib/modules/`uname -r`/build/include"
|
||||
# Test if vboxpci module loaded. If it is, skip everything else
|
||||
loaded=$(lsmod | grep vboxpci)
|
||||
if [ -n "$loaded" ] ; then
|
||||
echo "Kernel modules available - exiting..."
|
||||
exit 0
|
||||
echo "Kernel modules are loaded, unload them via"
|
||||
echo "systemctl stop vboxdrv.service if you wish to rebuild them."
|
||||
echo "Quitting .."
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Force installation of VB host sources. Zypper will install all the prerequisies
|
||||
echo "Installing all required packages..."
|
||||
killproc PackageKit
|
||||
zypper install -y virtualbox-host-source > /dev/null 2>&1
|
||||
if [ "$?" -ne 0 ] ; then
|
||||
echo "Installation of required packages failed."
|
||||
echo "Use 'sudo zypper install virtualbox-host-source' to see the reason."
|
||||
# Check if virtualbox-host-source is installed, quit if not
|
||||
if ! rpm -qf "$SOURCE/Makefile" &>/dev/null ; then
|
||||
echo "Sources for building host modules are not present,"
|
||||
echo "Use 'sudo zypper install virtualbox-host-source' to install them. Quitting .."
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
# Check if virtualbox-host-source version matches virtualbox version
|
||||
if [ "$(rpm -q virtualbox virtualbox-host-source --queryformat='%{version}-%{release}\n' 2>/dev/null | sort -u | wc -l)" -ne "1" ] ; then
|
||||
echo "virtualbox-host-source package version doesn't match"
|
||||
echo "the version of virtualbox package."
|
||||
echo "Reinstall virtualbox-host-source package. Quitting .."
|
||||
exit 1
|
||||
fi
|
||||
# Prerequisites are available, start build
|
||||
pushd $SOURCE > /dev/null 2>&1
|
||||
echo "Building kernel modules..."
|
||||
make clean &>/dev/null
|
||||
make > $LOGFILE 2>&1
|
||||
if [ "$?" -ne 0 ] ; then
|
||||
echo ""
|
||||
|
Reference in New Issue
Block a user