File vbox-vboxadd-init-script.diff of Package virtualbox

Index: src/VBox/Additions/linux/installer/vboxadd.sh
===================================================================
--- src/VBox/Additions/linux/installer/vboxadd.sh.orig
+++ src/VBox/Additions/linux/installer/vboxadd.sh
@@ -21,11 +21,12 @@
 #
 ### BEGIN INIT INFO
 # Provides:       vboxadd
-# Required-Start:
-# Required-Stop:
-# Default-Start:  2 3 4 5
+# Required-Start: $remote_fs
+# Required-Stop:  $remote_fs
+# Default-Start:  2 3 5
 # Default-Stop:   0 1 6
 # Description:    VirtualBox Linux Additions kernel modules
+# Short-Description: VirtualBox Linux Additions kernel modules
 ### END INIT INFO
 
 PATH=$PATH:/bin:/sbin:/usr/sbin
@@ -165,8 +166,6 @@ fi
 
 dev=/dev/vboxguest
 userdev=/dev/vboxuser
-owner=vboxadd
-group=1
 
 test_sane_kernel_dir()
 {
@@ -236,12 +235,6 @@ do_vboxguest_non_udev()
             fail "Cannot create device $dev with major $maj and minor $min"
         }
     fi
-    chown $owner:$group $dev 2>/dev/null || {
-        rm -f $dev 2>/dev/null
-        rm -f $userdev 2>/dev/null
-        rmmod vboxguest 2>/dev/null
-        fail "Cannot change owner $owner:$group for device $dev"
-    }
 
     if [ ! -c $userdev ]; then
         maj=10
@@ -252,12 +245,6 @@ do_vboxguest_non_udev()
                 rmmod vboxguest 2>/dev/null
                 fail "Cannot create device $userdev with major $maj and minor $min"
             }
-            chown $owner:$group $userdev 2>/dev/null || {
-                rm -f $dev 2>/dev/null
-                rm -f $userdev 2>/dev/null
-                rmmod vboxguest 2>/dev/null
-                fail "Cannot change owner $owner:$group for device $userdev"
-            }
         fi
     fi
 }
@@ -286,8 +273,7 @@ start()
         do_vboxguest_non_udev;;
     esac
 
-    if [ -n "$BUILDVBOXSF" ]; then
-        running_vboxsf || {
+    running_vboxsf || {
             $MODPROBE vboxsf > /dev/null 2>&1 || {
                 if dmesg | grep "vboxConnect failed" > /dev/null 2>&1; then
                     fail_msg
@@ -297,8 +283,7 @@ start()
                 fi
                 fail "modprobe vboxsf failed"
             }
-        }
-    fi
+    }
 
     # Mount all shared folders from /etc/fstab. Normally this is done by some
     # other startup script but this requires the vboxdrv kernel module loaded.
@@ -315,10 +300,8 @@ stop()
     if ! umount -a -t vboxsf 2>/dev/null; then
         fail "Cannot unmount vboxsf folders"
     fi
-    if [ -n "$BUILDVBOXSF" ]; then
-        if running_vboxsf; then
-            rmmod vboxsf 2>/dev/null || fail "Cannot unload module vboxsf"
-        fi
+    if running_vboxsf; then
+    	rmmod vboxsf 2>/dev/null || fail "Cannot unload module vboxsf"
     fi
     if running_vboxguest; then
         rmmod vboxguest 2>/dev/null || fail "Cannot unload module vboxguest"
@@ -464,16 +447,8 @@ extra_setup()
 # setup_script
 setup()
 {
-    setup_modules
-    mod_succ="$?"
-    extra_setup
-    if [ "$mod_succ" -eq "0" ]; then
-        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
-    fi
+	begin "Recompiling VirtualBox kernel module, NOT. It has been packaged."
+    succ_msg
 }
 
 # cleanup_script
openSUSE Build Service is sponsored by