2010-12-23 11:08:49 +01:00
|
|
|
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
|
|
|
|
|
2011-05-18 12:34:08 +02:00
|
|
|
test_for_gcc_and_make()
|
2010-12-23 11:08:49 +01:00
|
|
|
{
|
2011-05-18 12:34:08 +02:00
|
|
|
@@ -242,12 +241,6 @@ do_vboxguest_non_udev()
|
2010-12-23 11:08:49 +01:00
|
|
|
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
|
2011-05-18 12:34:08 +02:00
|
|
|
@@ -258,12 +251,6 @@ do_vboxguest_non_udev()
|
2010-12-23 11:08:49 +01:00
|
|
|
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
|
|
|
|
}
|
2011-05-18 12:34:08 +02:00
|
|
|
@@ -292,8 +279,7 @@ start()
|
2010-12-23 11:08:49 +01:00
|
|
|
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
|
2011-05-18 12:34:08 +02:00
|
|
|
@@ -303,8 +289,7 @@ start()
|
2010-12-23 11:08:49 +01:00
|
|
|
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.
|
2011-05-18 12:34:08 +02:00
|
|
|
@@ -321,10 +306,8 @@ stop()
|
2010-12-23 11:08:49 +01:00
|
|
|
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"
|
2011-05-18 12:34:08 +02:00
|
|
|
@@ -483,16 +466,8 @@ extra_setup()
|
2011-01-19 14:48:53 +01:00
|
|
|
# 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
|