Changeset 32237 in vbox
- Timestamp:
- Sep 3, 2010 2:59:00 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debian/postinst.in
r32183 r32237 133 133 134 134 BUILD_MODULES=0 135 REGISTER_MODULES=1 135 136 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox 136 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then 137 db_get virtualbox/module-compilation-allowed 138 if [ "$RET" = "false" ]; then 139 cat << EOF 137 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then 138 REGISTER_MODULES=0 139 if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then 140 db_get virtualbox/module-compilation-allowed 141 if [ "$RET" = "false" ]; then 142 cat << EOF 140 143 Unable to find a precompiled module for the current kernel 141 144 though module compilation denied by debconf setting. 142 145 EOF 143 else 144 db_input low virtualbox/module-compilation-allowed || true 145 db_go || true 146 db_get virtualbox/module-compilation-allowed 147 if [ "$RET" = "true" ]; then 148 BUILD_MODULES=1 146 else 147 db_input low virtualbox/module-compilation-allowed || true 148 db_go || true 149 db_get virtualbox/module-compilation-allowed 150 if [ "$RET" = "true" ]; then 151 BUILD_MODULES=1 152 fi 149 153 fi 150 154 fi 151 155 fi 152 156 153 if [ -x "`which invoke-rc.d 2>/dev/null`"]; then154 if [ $BUILD_MODULES -eq 1]; then157 if [ $BUILD_MODULES -eq 1 ]; then 158 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 155 159 invoke-rc.d vboxdrv setup || true 156 160 else 157 invoke-rc.d vboxdrv start || exit $?161 /etc/init.d/vboxdrv setup || true 158 162 fi 159 163 else 160 if [ $BUILD_MODULES -eq 1 ]; then 161 /etc/init.d/vboxdrv setup || true 164 # shipped modules found, register sources at DKMS anyway 165 if [ $REGISTER_MODULES -eq 1 ]; then 166 DKMS=`which dkms 2>/dev/null` 167 if [ -n "$DKMS" ]; then 168 $DKMS add -m vboxhost -v %VER% > /dev/null 2>&1 || true 169 fi 170 fi 171 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 172 invoke-rc.d vboxdrv start || exit $? 162 173 else 163 174 /etc/init.d/vboxdrv start || exit $? -
trunk/src/VBox/Installer/linux/debian/postinst.in
r32183 r32237 133 133 134 134 BUILD_MODULES=0 135 REGISTER_MODULES=1 135 136 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox 136 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then 137 db_get virtualbox/module-compilation-allowed 138 if [ "$RET" = "false" ]; then 139 cat << EOF 137 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then 138 REGISTER_MODULES=0 139 if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then 140 db_get virtualbox/module-compilation-allowed 141 if [ "$RET" = "false" ]; then 142 cat << EOF 140 143 Unable to find a precompiled module for the current kernel 141 144 though module compilation denied by debconf setting. 142 145 EOF 143 else 144 db_input low virtualbox/module-compilation-allowed || true 145 db_go || true 146 db_get virtualbox/module-compilation-allowed 147 if [ "$RET" = "true" ]; then 148 BUILD_MODULES=1 146 else 147 db_input low virtualbox/module-compilation-allowed || true 148 db_go || true 149 db_get virtualbox/module-compilation-allowed 150 if [ "$RET" = "true" ]; then 151 BUILD_MODULES=1 152 fi 149 153 fi 150 154 fi 151 155 fi 152 156 153 if [ -x "`which invoke-rc.d 2>/dev/null`"]; then154 if [ $BUILD_MODULES -eq 1]; then157 if [ $BUILD_MODULES -eq 1 ]; then 158 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 155 159 invoke-rc.d vboxdrv setup || true 156 160 else 157 invoke-rc.d vboxdrv start || exit $?161 /etc/init.d/vboxdrv setup || true 158 162 fi 159 163 else 160 if [ $BUILD_MODULES -eq 1 ]; then 161 /etc/init.d/vboxdrv setup || true 164 # shipped modules found, register sources at DKMS anyway 165 if [ $REGISTER_MODULES -eq 1 ]; then 166 DKMS=`which dkms 2>/dev/null` 167 if [ -n "$DKMS" ]; then 168 $DKMS add -m vboxhost -v %VER% > /dev/null 2>&1 || true 169 fi 170 fi 171 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 172 invoke-rc.d vboxdrv start || exit $? 162 173 else 163 174 /etc/init.d/vboxdrv start || exit $? -
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r32186 r32237 267 267 # Disable module compilation with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox 268 268 BUILD_MODULES=0 269 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then 270 # compile problem 271 cat << EOF 269 REGISTER_MODULES=1 270 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then 271 REGISTER_MODULES=0 272 if [ "$INSTALL_NO_VBOXDRV" != "1" ]; then 273 # compile problem 274 cat << EOF 272 275 No precompiled module for this kernel found -- trying to build one. Messages 273 276 emitted during module compilation will be logged to $LOG. 274 277 275 278 EOF 276 BUILD_MODULES=1 279 BUILD_MODULES=1 280 fi 277 281 fi 278 282 # if INSTALL_NO_VBOXDRV is set to 1, remove all shipped modules … … 288 292 /etc/init.d/vboxdrv setup || true 289 293 else 294 if [ $REGISTER_MODULES -eq 1 ]; then 295 DKMS=`which dkms 2>/dev/null` 296 if [ -n "$DKMS" ]; then 297 $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true 298 fi 299 fi 290 300 /etc/init.d/vboxdrv start > /dev/null 291 301 fi
Note:
See TracChangeset
for help on using the changeset viewer.