diff --git a/install-files/bumblebee-check.opensuse b/install-files/bumblebee-check.opensuse deleted file mode 100755 index bbcd64c..0000000 --- a/install-files/bumblebee-check.opensuse +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/bash - -# -# ---------------------------------------------------------------------------- -# "THE BEER-WARE LICENSE" (Revision 42): -# wrote this file. As long as you retain this notice you -# can do whatever you want with this stuff. If we meet some day, and you think -# this stuff is worth it, you can buy me a beer in return Martin Juhl -# ---------------------------------------------------------------------------- -# - -# This file is part of bumblebee. -# -# bumblebee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# bumblebee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with bumblebee. If not, see . -# - - -ROOT_UID=0 - -if [ `cat /etc/issue | grep -nir fedora | wc -l` -gt 0 ] ; then - DISTRO=FEDORA -elif [ `cat /etc/issue | grep -nir ubuntu | wc -l` -gt 0 ] || \ - [ `cat /etc/issue | grep -nir "Linux Mint" | wc -l` -gt 0 ] || \ - [ `cat /etc/issue | grep -nir "Backtrack 5" | wc -l` -gt 0 ] ; then - DISTRO=UBUNTU -elif [ `cat /etc/issue | grep -nir opensuse | wc -l` -gt 0 ] ; then - DISTRO=OPENSUSE - if [ "$SUDO_USER" != "" ] ; then - HOME=`cat /etc/passwd | grep $SUDO_USER | cut -f6 -d':'` - fi -else - echo "Cannot handle this distribution." -fi - -if [ "$UID" != "$ROOT_UID" ] ; then - echo "You don't have sufficient privileges to run this script." - echo - echo "Please run the script as root or with: sudo bumblebee-check <-restore>" - exit 1 -fi - -if [ "$DISTRO" != OPENSUSE ] ; then - echo "This script is ONLY for openSuSE." - echo - echo "It will probably kill the NVidia setup" - echo "on other systems." - echo - echo "You have been warned !!!" - exit 1 -fi - -#Determine Arch x86_64 or i686 -ARCH=`uname -m` - -# -# Check for repository -# -FOUND=`rpm -qa|grep x11-video-nvidia` -if [ "$FOUND" == "" ] ; then - if [ -d /usr/X11R6/lib-nvidia ] ; then - echo "Somebody uninstalled the packages from the nVidia repository." - echo "Trying to cleanup the system." - - if [ "$ARCH" == "i686" ] ; then - rm -rf /usr/X11R6/lib-nvidia - rm -rf /usr/lib/xorg-nvidia - else - rm -rf /usr/X11R6/lib-nvidia - rm -rf /usr/X11R6/lib64-nvidia - rm -rf /usr/lib64/xorg-nvidia - fi - else - echo "You are not using the nVidia repository for openSUSE." - echo "Sorry, cannot help you." - fi - exit 1 -fi - -if [ "$1" == "-restore" ] ; then - # - # Try to restore - # - if [ "$ARCH" == "i686" ] ; then - # - # Restore conflicting NVidia libraries - # - if [ `ls /usr/X11R6/lib-nvidia/libGL.* 2> /dev/null | wc -l` -gt 0 ] ; then - mkdir -p /usr/X11R6/lib - mv -f /usr/X11R6/lib-nvidia/libGL.* /usr/X11R6/lib/ - mv -f /usr/X11R6/lib-nvidia/libXvMCNVIDIA* /usr/X11R6/lib/ - rm -rf /usr/X11R6/lib-nvidia - fi - if [ -f /usr/lib/xorg-nvidia/modules/updates/drivers/nvidia_drv.so ] ; then - mv -f /usr/lib/xorg-nvidia/modules/updates/drivers/nvidia_drv.so /usr/lib/xorg/modules/updates/drivers/ - mv -f /usr/lib/xorg-nvidia/modules/updates/extensions/libglx.* /usr/lib/xorg/modules/updates/extensions/ - rm -rf /usr/lib/xorg-nvidia - fi - else - if [ `ls /usr/X11R6/lib-nvidia/libGL.* 2> /dev/null | wc -l` -gt 0 ] ; then - mkdir -p /usr/X11R6/lib - mv -f /usr/X11R6/lib-nvidia/libGL.* /usr/X11R6/lib/ - rm -rf /usr/X11R6/lib-nvidia - fi - if [ `ls /usr/X11R6/lib64-nvidia/libGL.* 2> /dev/null | wc -l` -gt 0 ] ; then - mkdir -p /usr/X11R6/lib64 - mv -f /usr/X11R6/lib64-nvidia/libGL.* /usr/X11R6/lib64/ - mv -f /usr/X11R6/lib64-nvidia/libXvMCNVIDIA* /usr/X11R6/lib64/ - rm -rf /usr/X11R6/lib64-nvidia - fi - if [ -f /usr/lib64/xorg-nvidia/modules/updates/drivers/nvidia_drv.so ] ; then - mv -f /usr/lib64/xorg-nvidia/modules/updates/drivers/nvidia_drv.so /usr/lib64/xorg/modules/updates/drivers/ - mv -f /usr/lib64/xorg-nvidia/modules/updates/extensions/libglx.* /usr/lib64/xorg/modules/updates/extensions/ - rm -rf /usr/lib64/xorg-nvidia - fi - fi -else - if [ "$ARCH" == "i686" ] ; then - if [ `ls /usr/X11R6/lib/libGL.* 2> /dev/null | wc -l` -gt 0 ] ; then - # - # Move conflicting NVidia libraries to a safer place. - # - rm -rf /usr/X11R6/lib-nvidia - mkdir -p /usr/X11R6/lib-nvidia - mv -f /usr/X11R6/lib/libGL.* /usr/X11R6/lib-nvidia/ - mv -f /usr/X11R6/lib/libXvMCNVIDIA* /usr/X11R6/lib-nvidia/ - fi - if [ -f /usr/lib/xorg/modules/updates/drivers/nvidia_drv.so ] ; then - # - # Move NVidia xorg modules to a safer place - # - rm -rf /usr/lib/xorg-nvidia - cp -a /usr/lib/xorg /usr/lib/xorg-nvidia - rm -f /usr/lib/xorg/modules/updates/drivers/nvidia_drv.so - rm -f /usr/lib/xorg/modules/updates/extensions/libglx.* - fi - else - if [ `ls /usr/X11R6/lib/libGL.* 2> /dev/null | wc -l` -gt 0 ] ; then - # - # Move conflicting i686 NVidia libraries to a safer place. - # - rm -rf /usr/X11R6/lib-nvidia - mkdir -p /usr/X11R6/lib-nvidia - mv -f /usr/X11R6/lib/libGL.* /usr/X11R6/lib-nvidia/ - fi - if [ `ls /usr/X11R6/lib64/libGL.* 2> /dev/null | wc -l` -gt 0 ] ; then - # - # Move conflicting x86_64 NVidia libraries to a safer place. - # - rm -rf /usr/X11R6/lib64-nvidia - mkdir -p /usr/X11R6/lib64-nvidia - mv -f /usr/X11R6/lib64/libGL.* /usr/X11R6/lib64-nvidia/ - mv -f /usr/X11R6/lib64/libXvMCNVIDIA* /usr/X11R6/lib64-nvidia/ - fi - if [ -f /usr/lib64/xorg/modules/updates/drivers/nvidia_drv.so ] ; then - # - # Move NVidia xorg modules to a safer place - # - rm -rf /usr/lib64/xorg-nvidia - cp -a /usr/lib64/xorg /usr/lib64/xorg-nvidia - rm -f /usr/lib64/xorg/modules/updates/drivers/nvidia_drv.so - rm -f /usr/lib64/xorg/modules/updates/extensions/libglx.* - fi - fi -fi diff --git a/install-files/bumblebee-configuration b/install-files/bumblebee-configuration old mode 100644 new mode 100755 index 410aaab..df47e3d --- a/install-files/bumblebee-configuration +++ b/install-files/bumblebee-configuration @@ -68,8 +68,8 @@ NVIDIABUSIDCUT=`grep BusID /etc/X11/xorg.conf.nvidia | sed -e "s/[ \t]*BusID[ \t if [ -f "$DEFAULT_FILE" ] ; then whiptail --yesno \ - "Bumblebee Configuration.\n\n"\ - "Do you really want to reconfigure bumblebee?" $LINES $COLUMNS || exit 0 +"Bumblebee Configuration.\n\n"\ +"Do you really want to reconfigure bumblebee?" $LINES $COLUMNS || exit 0 else # -f to prevent error messages should the file not exist rm -f "$DEFAULT_FILE" diff --git a/install-files/bumblebee-uninstall b/install-files/bumblebee-uninstall index 8c62f4d..703caf0 100755 --- a/install-files/bumblebee-uninstall +++ b/install-files/bumblebee-uninstall @@ -132,19 +132,6 @@ elif [ $DISTRO = OPENSUSE ]; then /usr/local/bin/bumblebee-enablecard fi -# FOUND=`rpm -qa|grep x11-video-nvidia` -# if [ "$FOUND" != "" ] || ( [ -d /usr/X11R6/lib-nvidia ] && [ ! -d /usr/X11R6/nvidia ] ) ; then -# if [ -f /usr/local/bin/bumblebee-check ] ; then - # - # Cleanup 3D hack for the repository - # - # Do not cleanup. It will kill the Intel 3D and put the Intel X server image upside down - # if the nVidia driver is not removed. - # -# /usr/local/bin/bumblebee-check -restore -# fi -# fi - if [ -f /usr/bin/nvidia-uninstall ] ; then echo "Uninstalling nVidia package"