2016-01-14 17:37:33 +01:00
|
|
|
--- src/VBox/Additions/linux/installer/vboxadd.sh.orig 2015-12-18 17:17:03.000000000 +0100
|
|
|
|
+++ src/VBox/Additions/linux/installer/vboxadd.sh 2016-01-14 15:45:13.793994484 +0100
|
|
|
|
@@ -23,9 +23,12 @@
|
2010-12-23 11:08:49 +01:00
|
|
|
# Provides: vboxadd
|
2016-01-14 17:37:33 +01:00
|
|
|
# Required-Start:
|
|
|
|
# Required-Stop:
|
2010-12-23 11:08:49 +01:00
|
|
|
-# Default-Start: 2 3 4 5
|
2016-01-14 17:37:33 +01:00
|
|
|
+# Should-Start: $remote_fs
|
|
|
|
+# Should-Stop: $remote_fs
|
2010-12-23 11:08:49 +01:00
|
|
|
+# 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
|
|
|
|
|
2012-10-02 16:03:09 +02:00
|
|
|
PATH=$PATH:/bin:/sbin:/usr/sbin
|
2016-01-14 17:37:33 +01:00
|
|
|
@@ -224,12 +227,6 @@
|
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
|
2016-01-14 17:37:33 +01:00
|
|
|
@@ -240,12 +237,6 @@
|
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
|
|
|
|
}
|
2016-01-14 17:37:33 +01:00
|
|
|
@@ -260,6 +251,13 @@
|
2015-12-27 10:25:33 +01:00
|
|
|
fi
|
|
|
|
test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
|
|
|
|
fail "Configuration file $config not complete"
|
2013-03-03 11:58:46 +01:00
|
|
|
+
|
|
|
|
+ if [ -x /usr/bin/systemd-detect-virt ]; then
|
|
|
|
+ if [ "x$(systemd-detect-virt)" != "xoracle" ]; then
|
|
|
|
+ fail "Not running on a virtualbox guest"
|
|
|
|
+ fi
|
|
|
|
+ fi
|
|
|
|
+
|
2015-05-15 17:49:23 +02:00
|
|
|
uname -r | grep -q -E '^2\.6|^3|^4' 2>/dev/null &&
|
2013-03-03 11:58:46 +01:00
|
|
|
ps -A -o comm | grep -q '/*udevd$' 2>/dev/null ||
|
|
|
|
no_udev=1
|
2016-01-14 17:37:33 +01:00
|
|
|
@@ -470,33 +468,8 @@
|
2011-01-19 14:48:53 +01:00
|
|
|
# setup_script
|
|
|
|
setup()
|
|
|
|
{
|
2012-10-02 16:03:09 +02:00
|
|
|
- if test -r $config; then
|
|
|
|
- . $config
|
|
|
|
- else
|
|
|
|
- fail "Configuration file $config not found"
|
|
|
|
- fi
|
|
|
|
- test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
|
|
|
|
- fail "Configuration file $config not complete"
|
|
|
|
- export BUILD_TYPE
|
|
|
|
- export USERNAME
|
|
|
|
-
|
2015-12-27 10:25:33 +01:00
|
|
|
- rm -f $LOG
|
2012-10-02 16:03:09 +02:00
|
|
|
- MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"
|
|
|
|
- BUILDINTMP="$MODULE_SRC/build_in_tmp"
|
|
|
|
- DODKMS="$MODULE_SRC/do_dkms"
|
|
|
|
- chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1
|
|
|
|
- chcon -t bin_t "$DODKMS" > /dev/null 2>&1
|
|
|
|
-
|
2011-01-19 14:48:53 +01:00
|
|
|
- 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
|
2012-10-02 16:03:09 +02:00
|
|
|
+ begin "Recompiling VirtualBox kernel module, NOT. It has been packaged."
|
2011-01-19 14:48:53 +01:00
|
|
|
+ succ_msg
|
|
|
|
}
|
|
|
|
|
|
|
|
# cleanup_script
|