Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread gevisz
2018-03-06 15:28 GMT+02:00 Rich Freeman :
> IMO disabling module autoloading by openrc seems like trying to kill a
> fly with a shotgun.  Just disable the configuration file that loads
> the particular modules that you don't want autoloaded, as was already
> suggested.  Then when you install something else whose modules you do
> want to load you won't spend six hours trying to figure out why it
> doesn't work, because nobody helping you realized that you modified
> the default openrc config.

Yes, I will probably stick with the empty /etc/modules-load.d/virtualbox.conf
file solution.

> I mean, if you really don't like it I guess you can also stick the
> autoload script in INSTALL_MASK, which seems to be the go-to solution
> around here when some optional functionality bothers you...

And thank you for pointing out to this possibility.

P.S. I also thank all who have replied to this thread.



Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread gevisz
2018-03-06 11:37 GMT+02:00 J. Roeleveld :
> On Tuesday, March 6, 2018 10:21:43 AM CET gevisz wrote:
>> 2018-03-05 23:35 GMT+02:00 Neil Bothwick :
>> > On Mon, 5 Mar 2018 22:40:00 +0200, gevisz wrote:
>> >> Can anybody explain me who loads virtualbox-modules without my consent
>> >> and how I can make them loaded only when I need them (just before I am
>> >> going to run VirtualBox, which I do not so often)?
>> >
>> > The ebuild installs /usr/lib/modules-load.d/virtualbox.conf which causes
>> > the modules to be loaded by systemd-modules-load.service. Systemd gives
>> > priority to similarly names files in /etc so creating an
>> > empty /etc/modules-load.d/virtualbox.conf should prevent them loading,
>> > although I'm basing that on the man page rather than actual experience.
>>
>> Thank you for your reply.
>>
>> My system indeed has file /usr/lib/modules-load.d/virtualbox.conf
>> file and it indeed lists all virtualbox modules.
>>
>> And, indeed, creating directory /etc/modules-load.d/ and an empty
>> /etc/modules-load.d/virtualbox.conf file precludes loading virtualbox
>> moduli during boot
>>
>> The only problem here is that I do not use systemd, only openrc.
>>
>> So, https://wiki.gentoo.org/wiki/VirtualBox is outdated?
>> At least with respect to its OpenRC part.
>>
>> And why at all OpenRC uses the systemd config files?
>>
>> Ah, yes, /etc/init.d/modules-load
>> "loads a list of modules from systemd-compatible locations".
>> Ok. But the problem is that I cannot find any symlink to this file
>> from any subdirectory of /etc/runlevels/
>>
>> > You could also disable the service if you don't want any
>> > non-hotplugged modules loaded at boot.
>>
>> So, I do not know how to disable this service.
>
> It is a dependency for "modules", which is (on my system) in the boot
> runlevel.

Yes, this is the case for my system. Thank you.



Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread Rich Freeman
On Tue, Mar 6, 2018 at 4:21 AM, gevisz  wrote:
>
> So, I do not know how to disable this service.
>

IMO disabling module autoloading by openrc seems like trying to kill a
fly with a shotgun.  Just disable the configuration file that loads
the particular modules that you don't want autoloaded, as was already
suggested.  Then when you install something else whose modules you do
want to load you won't spend six hours trying to figure out why it
doesn't work, because nobody helping you realized that you modified
the default openrc config.

I mean, if you really don't like it I guess you can also stick the
autoload script in INSTALL_MASK, which seems to be the go-to solution
around here when some optional functionality bothers you...

-- 
Rich



Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread Mick
On Tuesday, 6 March 2018 10:27:11 GMT J. Roeleveld wrote:
> On Tuesday, March 6, 2018 10:32:50 AM CET Mick wrote:
> > On Tuesday, 6 March 2018 09:21:43 GMT gevisz wrote:
> > > Ah, yes, /etc/init.d/modules-load
> > > "loads a list of modules from systemd-compatible locations".
> > > Ok. But the problem is that I cannot find any symlink to this file
> > > from any subdirectory of /etc/runlevels/
> > 
> > The file /etc/init.d/modules-load is a script, which refers to a number of
> > potential modules lists to load - read line 19 onward:
> > =
> > ...
> > find_modfiles()
> > {
> > 
> > local dirs="/usr/lib/modules-load.d /run/modules-load.d
> > 
> > /etc/modules- load.d"
> > 
> 
> Symlinks from /etc/runlevels/... means, the init-script is part of a
> runlevel.
> > > So, I do not know how to disable this service.
> > 
> > rc-update delete modules-load default
> 
> "modules-load" is, by default, not part of any runlevel.
> It is called as a dependency.
> 
> --
> Joost

Oh! On my laptop is shown under /etc/runlevels/default.

(as is I noticed udev-postmount, although this symlink is broken).

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread J. Roeleveld
On Tuesday, March 6, 2018 10:32:50 AM CET Mick wrote:
> On Tuesday, 6 March 2018 09:21:43 GMT gevisz wrote:
> > Ah, yes, /etc/init.d/modules-load
> > "loads a list of modules from systemd-compatible locations".
> > Ok. But the problem is that I cannot find any symlink to this file
> > from any subdirectory of /etc/runlevels/
> 
> The file /etc/init.d/modules-load is a script, which refers to a number of
> potential modules lists to load - read line 19 onward:
> =
> ...
> find_modfiles()
> {
> local dirs="/usr/lib/modules-load.d /run/modules-load.d
> /etc/modules- load.d"
> 

Symlinks from /etc/runlevels/... means, the init-script is part of a runlevel.

> > So, I do not know how to disable this service.
> 
> rc-update delete modules-load default

"modules-load" is, by default, not part of any runlevel.
It is called as a dependency.

--
Joost



Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread J. Roeleveld
On Tuesday, March 6, 2018 10:21:43 AM CET gevisz wrote:
> 2018-03-05 23:35 GMT+02:00 Neil Bothwick :
> > On Mon, 5 Mar 2018 22:40:00 +0200, gevisz wrote:
> >> Can anybody explain me who loads virtualbox-modules without my consent
> >> and how I can make them loaded only when I need them (just before I am
> >> going to run VirtualBox, which I do not so often)?
> > 
> > The ebuild installs /usr/lib/modules-load.d/virtualbox.conf which causes
> > the modules to be loaded by systemd-modules-load.service. Systemd gives
> > priority to similarly names files in /etc so creating an
> > empty /etc/modules-load.d/virtualbox.conf should prevent them loading,
> > although I'm basing that on the man page rather than actual experience.
> 
> Thank you for your reply.
> 
> My system indeed has file /usr/lib/modules-load.d/virtualbox.conf
> file and it indeed lists all virtualbox modules.
> 
> And, indeed, creating directory /etc/modules-load.d/ and an empty
> /etc/modules-load.d/virtualbox.conf file precludes loading virtualbox
> moduli during boot
> 
> The only problem here is that I do not use systemd, only openrc.
> 
> So, https://wiki.gentoo.org/wiki/VirtualBox is outdated?
> At least with respect to its OpenRC part.
> 
> And why at all OpenRC uses the systemd config files?
> 
> Ah, yes, /etc/init.d/modules-load
> "loads a list of modules from systemd-compatible locations".
> Ok. But the problem is that I cannot find any symlink to this file
> from any subdirectory of /etc/runlevels/
> 
> > You could also disable the service if you don't want any
> > non-hotplugged modules loaded at boot.
> 
> So, I do not know how to disable this service.

It is a dependency for "modules", which is (on my system) in the boot 
runlevel.

--
Joost





Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread Mick
On Tuesday, 6 March 2018 09:21:43 GMT gevisz wrote:

> Ah, yes, /etc/init.d/modules-load
> "loads a list of modules from systemd-compatible locations".
> Ok. But the problem is that I cannot find any symlink to this file
> from any subdirectory of /etc/runlevels/

The file /etc/init.d/modules-load is a script, which refers to a number of 
potential modules lists to load - read line 19 onward:
=
...
find_modfiles()
{
local dirs="/usr/lib/modules-load.d /run/modules-load.d /etc/modules-
load.d"



> So, I do not know how to disable this service.

rc-update delete modules-load default

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-06 Thread gevisz
2018-03-05 23:35 GMT+02:00 Neil Bothwick :
> On Mon, 5 Mar 2018 22:40:00 +0200, gevisz wrote:
>
>> Can anybody explain me who loads virtualbox-modules without my consent
>> and how I can make them loaded only when I need them (just before I am
>> going to run VirtualBox, which I do not so often)?
>
> The ebuild installs /usr/lib/modules-load.d/virtualbox.conf which causes
> the modules to be loaded by systemd-modules-load.service. Systemd gives
> priority to similarly names files in /etc so creating an
> empty /etc/modules-load.d/virtualbox.conf should prevent them loading,
> although I'm basing that on the man page rather than actual experience.

Thank you for your reply.

My system indeed has file /usr/lib/modules-load.d/virtualbox.conf
file and it indeed lists all virtualbox modules.

And, indeed, creating directory /etc/modules-load.d/ and an empty
/etc/modules-load.d/virtualbox.conf file precludes loading virtualbox
moduli during boot

The only problem here is that I do not use systemd, only openrc.

So, https://wiki.gentoo.org/wiki/VirtualBox is outdated?
At least with respect to its OpenRC part.

And why at all OpenRC uses the systemd config files?

Ah, yes, /etc/init.d/modules-load
"loads a list of modules from systemd-compatible locations".
Ok. But the problem is that I cannot find any symlink to this file
from any subdirectory of /etc/runlevels/

> You could also disable the service if you don't want any
> non-hotplugged modules loaded at boot.

So, I do not know how to disable this service.



Re: [gentoo-user] Are VirtualBox moduli loaded by themselves?

2018-03-05 Thread Neil Bothwick
On Mon, 5 Mar 2018 22:40:00 +0200, gevisz wrote:

> Can anybody explain me who loads virtualbox-modules without my consent
> and how I can make them loaded only when I need them (just before I am
> going to run VirtualBox, which I do not so often)?

The ebuild installs /usr/lib/modules-load.d/virtualbox.conf which causes
the modules to be loaded by systemd-modules-load.service. Systemd gives
priority to similarly names files in /etc so creating an
empty /etc/modules-load.d/virtualbox.conf should prevent them loading,
although I'm basing that on the man page rather than actual experience.

You could also disable the service if you don't want any
non-hotplugged modules loaded at boot.


-- 
Neil Bothwick

Cross-country skiing is great in small countries.


pgpZUSRvu7PPd.pgp
Description: OpenPGP digital signature