Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 299586 - app-cdr/cdemud-1.2.0 init.d script should load/unload vhba module
Summary: app-cdr/cdemud-1.2.0 init.d script should load/unload vhba module
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Alexandre Rostovtsev (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-04 11:21 UTC by Pavel Procopiuc
Modified: 2013-01-29 15:40 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
1.2.1-devname_kernel-2.6.35.patch (1.2.1-devname_kernel-2.6.35.patch,536 bytes, patch)
2010-08-13 06:57 UTC, Tiziano Müller (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Procopiuc 2010-01-04 11:21:43 UTC
Previous version of init.d script (cdemud.init.d) had logic for loading vhba kernel module on start and unloading it on stop, but it's gone in current version (cdemud.init.d-1.1.0).
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2010-01-09 19:57:44 UTC
module loading should happen automatically by udev. Probably the following warning has something to do with that:

Jan  9 22:52:19 tablet udevd[934]: NAME="%k" is superfluous and breaks kernel supplied names, please remove it from /etc/udev/rules.d/70-vhba.rules:3
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2010-01-09 21:23:06 UTC
Oh, ignore comment #1.

Tiziano do you remember why that code was dropped?
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2010-01-18 11:11:59 UTC
It was decided that init.d script should not do that, but it's better to add propper code inside cdemud.
Comment 4 Pavel Procopiuc 2010-01-18 12:04:00 UTC
But I suppose we can have this code in init script (as it is already different from upstream one) until this code is in upstream, am I right?
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2010-01-18 13:06:01 UTC
We have a /etc/conf.d/modules for loading modules.
I don't see why we need some logic in an apps init.d script.
Comment 6 Pavel Procopiuc 2010-01-18 13:18:08 UTC
Well, in general, one doesn't need this module to be loaded the all the time the machine is running. Just for the time cdemud is running. For example, alsasound init script uses similar logic.
Comment 7 Yuri Sevatz 2010-04-09 00:24:07 UTC
(In reply to comment #3)
> It was decided that init.d script should not do that, but it's better to add
> propper code inside cdemud.
> 

I Agree.  Quirking init.d scripts puts too much emphasis on distribution.  If this functionality is required, it's best they try to fix it for all distributions, and not just gentoo.
Comment 8 Tiziano Müller (RETIRED) gentoo-dev 2010-07-26 06:39:37 UTC
ok, the fix is coming with kernel 2.6.35:
  http://git.kernel.org/linus/31373d09da5b7fe21fe6f781e92bd534a3495f00
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2010-08-02 08:03:33 UTC
(In reply to comment #8)
> ok, the fix is coming with kernel 2.6.35:
>   http://git.kernel.org/linus/31373d09da5b7fe21fe6f781e92bd534a3495f00

Tiziano, could you clarify, how does laptop-mode per-device flushing helps here?
Comment 10 Tiziano Müller (RETIRED) gentoo-dev 2010-08-02 09:18:20 UTC
bah, failed at copy/pasting.

here's what I really wanted to paste:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=578454ff7eab61d13a26b568f99a89a2c9edc881
Comment 11 Tiziano Müller (RETIRED) gentoo-dev 2010-08-13 06:57:07 UTC
Created attachment 242713 [details, diff]
1.2.1-devname_kernel-2.6.35.patch

A preliminary patch for vhba to make this happen...
Comment 12 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-23 09:43:13 UTC
(In reply to comment #11)
> Created attachment 242713 [details, diff] [details, diff]
> 1.2.1-devname_kernel-2.6.35.patch
> 
> A preliminary patch for vhba to make this happen...

Doesn't seem to work here (~amd64, kernel 3.1.1, udev-171-r2, module-init-tools-3.16-r1).

I have tried applying this patch and using 'KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemu", OPTIONS+="static_node=vhba_ctl"' in 70-vhba.rules. Now, modules.devname does correctly get a "vhba vhba_ctl c10:250" line, and with the vhba module unloaded, I do get /dev/vhba_ctrl created with the correct permissions after restarting udevd. However, the vhba module does not get loaded when trying to write to /dev/vhba_ctrl.

Are there special kernel configs that are required for this to work?
Comment 13 Julian Ospald 2013-01-29 15:40:01 UTC
cdemu-daemon does not ship an init.d script anymore