Bug 168897 - /usr/local/etc/rc.d/vboxguest stop from emulators/virtualbox-ose-additions don't unload kernel module vboxguest.ko
Summary: /usr/local/etc/rc.d/vboxguest stop from emulators/virtualbox-ose-additions do...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Virtualbox Team (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 17:20 UTC by Vladimir Druzenko
Modified: 2012-08-04 07:50 UTC (History)
0 users

See Also:


Attachments
file.diff (651 bytes, patch)
2012-06-09 17:20 UTC, Vladimir Druzenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2012-06-09 17:20:10 UTC
Start/stop script /usr/local/etc/rc.d/vboxguest of port emulators/virtualbox-ose-additions don't unload kernel module vboxguest.ko after run /usr/local/etc/rc.d/vboxguest stop.

Command kldstat -m vboxguest can't find module with name vboxguest, because real name of this module is pci/vboxguest:
# kldstat -m vboxguest
kldstat: can't find module vboxguest: No such file or directory
# kldstat -v -n vboxguest
Id Refs Address            Size     Name
 2    1 0xffffffff80e12000 26018    vboxguest.ko (/boot/modules/vboxguest.ko)
        Contains modules:
                Id Name
                277 pci/vboxguest
# kldstat -m pci/vboxguest
Id  Refs Name
277    1 pci/vboxguest

Fix: --- /usr/ports/emulators/virtualbox-ose-additions/files/vboxguest.in.old    2012-06-09 19:54:28.879336155 +0400
+++ /usr/ports/emulators/virtualbox-ose-additions/files/vboxguest.in        2012-06-09 19:54:46.510330673 +0400
@@ -24,7 +24,7 @@
 
 vboxguest_start()
 {
-       if ! kldstat -q -m vboxguest;
+       if ! kldstat -q -m pci/vboxguest;
        then
                if ! kldload vboxguest > /dev/null 2>&1;
                then
@@ -36,7 +36,7 @@
 
 vboxguest_stop()
 {
-        if kldstat -q -m vboxguest;
+        if kldstat -q -m pci/vboxguest;
         then
                 if ! kldunload vboxguest > /dev/null 2>&1;
                 then

Patch attached with submission follows:
How-To-Repeat: /usr/local/etc/rc.d/vboxservice stop
kldstat
/usr/local/etc/rc.d/vboxguest stop
kldstat

Module vboxguest.ko exist after stop.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-10 00:41:46 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-10 00:41:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vbox

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-08-04 07:41:35 UTC
Author: decke
Date: Sat Aug  4 06:41:24 2012
New Revision: 302002
URL: http://svn.freebsd.org/changeset/ports/302002

Log:
  - Use correct modulname for kldstat
  - Bump PORTREVISION
  
  PR:		ports/168897
  Submitted by:	VVD <vvd@unislabs.com>

Modified:
  head/emulators/virtualbox-ose-additions/Makefile
  head/emulators/virtualbox-ose-additions/files/vboxguest.in

Modified: head/emulators/virtualbox-ose-additions/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-additions/Makefile	Sat Aug  4 06:16:29 2012	(r302001)
+++ head/emulators/virtualbox-ose-additions/Makefile	Sat Aug  4 06:41:24 2012	(r302002)
@@ -7,6 +7,7 @@
 
 PORTNAME=	virtualbox-ose
 DISTVERSION=	4.1.18
+PORTREVISION=	1
 CATEGORIES=	emulators kld
 MASTER_SITES=	http://tmp.chruetertee.ch/ \
 		http://freebsd.unixfreunde.de/sources/ \

Modified: head/emulators/virtualbox-ose-additions/files/vboxguest.in
==============================================================================
--- head/emulators/virtualbox-ose-additions/files/vboxguest.in	Sat Aug  4 06:16:29 2012	(r302001)
+++ head/emulators/virtualbox-ose-additions/files/vboxguest.in	Sat Aug  4 06:41:24 2012	(r302002)
@@ -24,7 +24,7 @@ stop_cmd="vboxguest_stop"
 
 vboxguest_start()
 {
-	if ! kldstat -q -m vboxguest;
+	if ! kldstat -q -m pci/vboxguest;
 	then
 		if ! kldload vboxguest > /dev/null 2>&1;
 		then
@@ -36,7 +36,7 @@ vboxguest_start()
 
 vboxguest_stop()
 {
-        if kldstat -q -m vboxguest;
+        if kldstat -q -m pci/vboxguest;
         then
                 if ! kldunload vboxguest > /dev/null 2>&1;
                 then
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Bernhard Froehlich freebsd_committer freebsd_triage 2012-08-04 07:42:21 UTC
State Changed
From-To: open->closed

Committed. Thanks!