Changeset 32183 in vbox for trunk/debian
- Timestamp:
- Sep 1, 2010 3:53:42 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 65467
- Location:
- trunk/debian
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debian/postinst.in
r31999 r32183 93 93 fi 94 94 95 # try to build a kernel module (disable with INSTALL_NO_VBOXDRV=1 in /etc/default/virtualbox)96 REGISTER_DKMS=197 if [ ! -f /lib/modules/`uname -r`/misc/vboxdrv.ko -a "$INSTALL_NO_VBOXDRV" != "1" ]; then98 db_get virtualbox/module-compilation-allowed99 if [ "$RET" = "false" ]; then100 cat << EOF101 Unable to find a precompiled module for the current kernel102 though module compilation denied by debconf setting.103 EOF104 else105 db_input low virtualbox/module-compilation-allowed || true106 db_go || true107 db_get virtualbox/module-compilation-allowed108 if [ "$RET" = "true" ]; then109 # Compile module. Don't show a message box here if everything works well.110 cat << EOF111 Messages emitted during module compilation will be logged to $LOG.112 EOF113 rm -f /etc/vbox/module_not_compiled114 echo "** Compiling vboxdrv" > /var/log/vbox-install.log115 if ! /usr/share/virtualbox/src/vboxdrv/build_in_tmp \116 --save-module-symvers /tmp/vboxdrv-Module.symvers \117 --no-print-directory KBUILD_VERBOSE= \118 install >> /var/log/vbox-install.log 2>&1; then119 db_fset virtualbox/module-compilation-failed seen false120 db_input critical virtualbox/module-compilation-failed || true121 db_go || true122 touch /etc/vbox/module_not_compiled123 # don't abort the installation!124 else125 echo "** Compiling vboxnetflt" >> /var/log/vbox-install.log126 if ! /usr/share/virtualbox/src/vboxnetflt/build_in_tmp \127 --use-module-symvers /tmp/vboxdrv-Module.symvers \128 --no-print-directory KBUILD_VERBOSE= \129 install >> /var/log/vbox-install.log 2>&1; then130 db_fset virtualbox/module-compilation-failed seen false131 db_input critical virtualbox/module-compilation-failed || true132 db_go || true133 touch /etc/vbox/module_not_compiled134 # don't abort the installation!135 else136 echo "** Compiling vboxnetadp" >> /var/log/vbox-install.log137 if ! /usr/share/virtualbox/src/vboxnetadp/build_in_tmp \138 --use-module-symvers /tmp/vboxdrv-Module.symvers \139 --no-print-directory KBUILD_VERBOSE= \140 install >> /var/log/vbox-install.log 2>&1; then141 db_fset virtualbox/module-compilation-failed seen false142 db_input critical virtualbox/module-compilation-failed || true143 db_go || true144 touch /etc/vbox/module_not_compiled145 # don't abort the installation!146 fi147 fi148 fi149 # cleanup150 rm -f /tmp/vboxdrv-Module.symvers151 if [ ! -f /etc/vbox/module_not_compiled ]; then152 # success153 cat << EOF154 Success!155 EOF156 REGISTER_DKMS=157 fi158 fi159 fi160 fi161 162 # Register at DKMS. If the modules were built above, they are already registered163 if [ -n "$REGISTER_DKMS" ]; then164 DKMS=`which dkms 2>/dev/null`165 if [ -n "$DKMS" ]; then166 for m in vboxdrv vboxnetflt vboxnetadp; do167 $DKMS status -m $m | while read line; do168 if echo "$line" | grep -q added > /dev/null ||169 echo "$line" | grep -q built > /dev/null ||170 echo "$line" | grep -q installed > /dev/null; then171 v=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"`172 $DKMS remove -m $m -v $v --all > /dev/null 2>&1173 fi174 done175 $DKMS add -m $m -v %VER% > /dev/null 2>&1176 done177 fi178 fi179 180 # There might be an old module active (e.g. manually loaded)181 if lsmod | grep -q "vboxdrv[^_-]"; then182 /etc/init.d/vboxdrv stop || true183 fi184 185 95 # The starters need to be Suid root. They drop the privileges before starting 186 96 # the real frontend. … … 212 122 #DEBHELPER# 213 123 124 if [ "$1" = "configure" ]; then 125 # Start vboxdrv/vboxweb-service manually as we use our own error handling in postrm 126 if [ -x "/etc/init.d/vboxdrv" ]; then 127 update-rc.d vboxdrv defaults >/dev/null 128 129 # There might be an old module active (e.g. manually loaded) 130 if lsmod | grep -q "vboxdrv[^_-]"; then 131 /etc/init.d/vboxdrv stop || true 132 fi 133 134 BUILD_MODULES=0 135 # 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 140 Unable to find a precompiled module for the current kernel 141 though module compilation denied by debconf setting. 142 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 149 fi 150 fi 151 fi 152 153 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 154 if [ $BUILD_MODULES -eq 1 ]; then 155 invoke-rc.d vboxdrv setup || true 156 else 157 invoke-rc.d vboxdrv start || exit $? 158 fi 159 else 160 if [ $BUILD_MODULES -eq 1 ]; then 161 /etc/init.d/vboxdrv setup || true 162 else 163 /etc/init.d/vboxdrv start || exit $? 164 fi 165 fi 166 fi 167 if [ -x "/etc/init.d/vboxweb-service" ]; then 168 update-rc.d vboxweb-service defaults >/dev/null 169 # if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 170 # invoke-rc.d vboxweb-service start || exit $? 171 # else 172 # /etc/init.d/vboxweb-service start || exit $? 173 # fi 174 fi 175 176 fi # $1 = "configure" 177 214 178 exit 0 -
trunk/debian/prerm.in
r32030 r32183 44 44 45 45 # make sure we de-register the DMKS modules before the files get removed 46 DKMS=`which dkms 2>/dev/null` 47 if [ -n "$DKMS" ]; then 48 $DKMS remove -m vboxnetadp -v %VER% --all > /dev/null 2>&1 || true49 $DKMS remove -m vboxnetflt -v %VER% --all > /dev/null 2>&1 || true50 $DKMS remove -m vboxdrv -v %VER% --all > /dev/null 2>&1 || true46 if [ "$1" = "upgrade" -o "$1" = "remove" -o "$1" = "deconfigure" ]; then 47 DKMS=`which dkms 2>/dev/null` 48 if [ -n "$DKMS" ]; then 49 $DKMS remove -m vboxhost -v %VER% --all > /dev/null 2>&1 || true 50 fi 51 51 fi 52 52 -
trunk/debian/rules
r32045 r32183 250 250 usr/bin/VBox usr/bin/VBoxHeadless \ 251 251 $(if $(NOWEBSVC),,usr/bin/VBox usr/bin/vboxwebsrv) \ 252 usr/share/virtualbox/src/vboxdrv usr/src/vboxdrv-$(ver) \ 253 usr/share/virtualbox/src/vboxnetflt usr/src/vboxnetflt-$(ver) \ 254 usr/share/virtualbox/src/vboxnetadp usr/src/vboxnetadp-$(ver) 252 usr/share/virtualbox/src/vboxhost usr/src/vboxhost-$(ver) 255 253 dh_desktop 256 254 dh_installmenu
Note:
See TracChangeset
for help on using the changeset viewer.