diff options
Diffstat (limited to 'system/virtualbox-ose-addons/rc.vboxadd.diff')
-rw-r--r-- | system/virtualbox-ose-addons/rc.vboxadd.diff | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/system/virtualbox-ose-addons/rc.vboxadd.diff b/system/virtualbox-ose-addons/rc.vboxadd.diff new file mode 100644 index 0000000000..209c606f98 --- /dev/null +++ b/system/virtualbox-ose-addons/rc.vboxadd.diff @@ -0,0 +1,144 @@ +--- vboxadd.sh 2009-12-17 15:25:34.000000000 +0100 ++++ vboxadd.sh 2009-12-24 11:20:10.750796198 +0100 +@@ -305,139 +305,13 @@ + # setup_script + setup() + { +- # don't stop the old modules here -- they might be in use +- if find /lib/modules/`uname -r` -name "vboxvideo\.*" 2>/dev/null|grep -q vboxvideo; then +- begin "Removing old VirtualBox vboxvideo kernel module" +- find /lib/modules/`uname -r` -name "vboxvideo\.*" 2>/dev/null|xargs rm -f 2>/dev/null +- succ_msg +- fi +- if find /lib/modules/`uname -r` -name "vboxvfs\.*" 2>/dev/null|grep -q vboxvfs; then +- begin "Removing old VirtualBox vboxvfs kernel module" +- find /lib/modules/`uname -r` -name "vboxvfs\.*" 2>/dev/null|xargs rm -f 2>/dev/null +- succ_msg +- fi +- if find /lib/modules/`uname -r` -name "vboxguest\.*" 2>/dev/null|grep -q vboxguest; then +- begin "Removing old VirtualBox vboxguest kernel module" +- find /lib/modules/`uname -r` -name "vboxguest\.*" 2>/dev/null|xargs rm -f 2>/dev/null +- succ_msg +- fi +- begin "Building the VirtualBox Guest Additions kernel modules" +- if ! sh /usr/share/$PACKAGE/test/build_in_tmp \ +- --no-dkms --no-print-directory > $LOG 2>&1; then +- fail "`printf "Your system does not seem to be set up to build kernel modules.\nLook at $LOG to find out what went wrong"`" +- fi +- echo +- if ! sh /usr/share/$PACKAGE/test_drm/build_in_tmp \ +- --no-dkms --no-print-directory >> $LOG 2>&1; then +- printf "\nYour guest system does not seem to have sufficient OpenGL support to enable\naccelerated 3D effects (this requires Linux 2.6.27 or later in the guest\nsystem). This Guest Additions feature will be disabled.\n\n" +- BUILDVBOXVIDEO="" +- fi +- begin "Building the main Guest Additions module" +- if ! $BUILDVBOXGUEST \ +- --save-module-symvers /tmp/vboxguest-Module.symvers \ +- --no-print-directory install >> $LOG 2>&1; then +- fail "Look at $LOG to find out what went wrong" +- fi +- succ_msg +- if [ -n "$BUILDVBOXVFS" ]; then +- begin "Building the shared folder support module" +- if ! $BUILDVBOXVFS \ +- --use-module-symvers /tmp/vboxguest-Module.symvers \ +- --no-print-directory install >> $LOG 2>&1; then +- fail "Look at $LOG to find out what went wrong" +- fi +- succ_msg +- fi +- if [ -n "$BUILDVBOXVIDEO" ]; then +- begin "Building the OpenGL support module" +- if ! $BUILDVBOXVIDEO \ +- --use-module-symvers /tmp/vboxguest-Module.symvers \ +- --no-print-directory install >> $LOG 2>&1; then +- fail "Look at $LOG to find out what went wrong" +- fi +- succ_msg +- fi +- depmod +- +- begin "Doing non-kernel setup of the Guest Additions" +- echo "Creating user for the Guest Additions." >> $LOG +- # This is the LSB version of useradd and should work on recent +- # distributions +- useradd -d /var/run/vboxadd -g 1 -r -s /bin/false vboxadd >/dev/null 2>&1 +- # And for the others, we choose a UID ourselves +- useradd -d /var/run/vboxadd -g 1 -u 501 -o -s /bin/false vboxadd >/dev/null 2>&1 +- +- # Create udev description file +- if [ -d /etc/udev/rules.d ]; then +- echo "Creating udev rule for the Guest Additions kernel module." >> $LOG +- udev_call="" +- udev_app=`which udevadm 2> /dev/null` +- if [ $? -eq 0 ]; then +- udev_call="${udev_app} version 2> /dev/null" +- else +- udev_app=`which udevinfo 2> /dev/null` +- if [ $? -eq 0 ]; then +- udev_call="${udev_app} -V 2> /dev/null" +- fi +- fi +- udev_fix="=" +- if [ "${udev_call}" != "" ]; then +- udev_out=`${udev_call}` +- udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` +- if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then +- udev_fix="" +- fi +- fi +- ## @todo 60-vboxadd.rules -> 60-vboxguest.rules ? +- echo "KERNEL=${udev_fix}\"vboxguest\", NAME=\"vboxguest\", OWNER=\"vboxadd\", MODE=\"0660\"" > /etc/udev/rules.d/60-vboxadd.rules +- echo "KERNEL=${udev_fix}\"vboxuser\", NAME=\"vboxuser\", OWNER=\"vboxadd\", MODE=\"0666\"" >> /etc/udev/rules.d/60-vboxadd.rules +- fi +- +- # Put mount.vboxsf in the right place +- ln -sf "$lib_path/$PACKAGE/mount.vboxsf" /sbin +- +- succ_msg +- if running_vboxguest || running_vboxadd; then +- printf "You should restart your guest to make sure the new modules are actually used\n\n" +- else +- start +- fi ++ echo "Not implemented! Please use the virtualbox-kernel-addons.SlackBuild available at SlackBuilds.org instead." + } + + # cleanup_script + cleanup() + { +- # Delete old versions of VBox modules. +- DKMS=`which dkms 2>/dev/null` +- if [ -n "$DKMS" ]; then +- echo "Attempt to remove old DKMS modules..." +- for mod in vboxadd vboxguest vboxvfs vboxvideo; do +- $DKMS status -m $mod | while read line; do +- if echo "$line" | grep -q added > /dev/null || +- echo "$line" | grep -q built > /dev/null || +- echo "$line" | grep -q installed > /dev/null; then +- version=`echo "$line" | sed "s/$mod,\([^,]*\)[,:].*/\1/;t;d"` +- echo " removing module $mod version $version" +- $DKMS remove -m $mod -v $version --all 1>&2 +- fi +- done +- done +- echo "Done." +- fi +- +- # Remove old installed modules +- find /lib/modules -name vboxadd\* | xargs rm 2>/dev/null +- find /lib/modules -name vboxguest\* | xargs rm 2>/dev/null +- find /lib/modules -name vboxvfs\* | xargs rm 2>/dev/null +- find /lib/modules -name vboxvideo\* | xargs rm 2>/dev/null +- depmod +- +- # Remove old module sources +- rm -rf /usr/src/vboxadd-* /usr/src/vboxguest-* /usr/src/vboxvfs-* /usr/src/vboxvideo-* +- +- # Remove other files +- rm /sbin/mount.vboxsf 2>/dev/null +- rm /etc/udev/rules.d/60-vboxadd.rules 2>/dev/null ++ echo "Not implemented! Please use removepkg or pkgtool to remove virtualbox-{ose,kernel}-addons instead." + } + + dmnstatus() |