Commit Graph

31 Commits

Author SHA1 Message Date
William Hubbs
3cc4c01485 remove trailing space 2022-06-28 17:21:54 -05:00
William Hubbs
414f398498 modules.in: always return 0, make loading more verbose 2022-06-27 17:32:42 -05:00
Mike Frysinger
301161a7a4 use HEAD in git URIs to point to the default branch
This makes the URIs shorter and dynamic: whatever the default branch
the repo uses will be used.
2021-12-20 20:07:00 -05:00
Lars Wendler
0d86c4903b init.d/modules.in: Avoid loading modules twice in Linux with dash shell
Since commit 6b475ab269, openrc tries to load
modules twice which have been defined in /etc/conf.d/modules via modules=
variable when /bin/sh points to dash shell.
The reason is that when the "modules-load" service was merged into "modules"
service, the "modules" variable name got used in both, load_modules()
function and in Linux_modules() function which both get called when modules
service is started. Although "modules" variable is marked as local in
load_modules(), dash simply ignores this.

Avoid the issue by renaming "modules" variable to "_modules" in
load_modules() function.

This fixes #419.
2021-05-12 18:20:43 -05:00
William Hubbs
d70b1c55b6 modules: Add --first-time switch to modprobe commands
On Linux, kernel modules should be loaded once during boot, either in an
initramfs or by this service.

This does not change anything other than printing out messages if a
module is loaded more than once.

X-Gentoo-Bug: 659530
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=659530
2018-10-23 16:47:37 -05:00
Austin English
02af093043 misc: whitespace fixes 2018-10-13 12:53:54 -04:00
William Hubbs
a571a42421 modules: remove the ability to rename modules on the fly
Kmod doesn't support the -o switch, so if you have been using this your
module loads have been failing.
2018-06-29 15:29:46 -05:00
William Hubbs
6b475ab269 init.d/modules: add code from modules-load service
There is no reason for these to be separate services. I did add a
provide so that we don't break backward compatibility.
2018-03-16 14:33:01 -05:00
William Hubbs
abe552b969 modules: get rid of printing each module on Linux
Now that we respect the module blacklists, don't print every module we
try to load, because it might not end up loaded due to the blacklist,
and modprobe doesn't consider that a failure.
2016-12-17 19:21:13 -06:00
William Hubbs
bf73363f22 Add --use-blacklist to modprobe calls in modules and modules-load
This means that we will honor the modprobe black lists.

X-Gentoo-Bug: 594012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594012
2016-09-20 13:15:39 -05:00
William Hubbs
556dbff99d Add modules-load.d support 2016-08-25 12:08:44 -05:00
William Hubbs
da28a3d367 init.d: initial service adjustments for docker support
Add -docker keyword to the same scripts that have -lxc keyword.
2016-07-31 13:01:17 -05:00
William Hubbs
314ae3dc78 modules: add support for FreeBSD
This is based on a patch submitted by
Joe Maloney <pkgdemonteam@gmail.com>.

This fixes #91.
2016-07-18 17:09:41 -05:00
William Hubbs
000503fad7 Convert OpenRC to a centralized copyright/license structure
In the past, OpenRC was a hybrid of a centralized and file-scope
license/copyright structure.

I followed the instructions from the Software Freedom Law Center [1] to
convert to a Centralized structure where possible, for easier future
maintenance.

[1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
2015-12-21 12:16:06 -06:00
Mike Gilbert
7bd456ed7b Disable service scripts for systemd-nspawn
This adds the -systemd-nspawn keyword to service scripts which are not
intended to run in systemd-nspawn containers.

This fixes #52.

    X-Gentoo-Bug: 548058
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548058
2015-05-01 09:14:09 -05:00
William Hubbs
3470eda3f5 Rename runscript to openrc-run
This was requested by Debian, because the minicom software, which is
available on Debian and other distros, has a binary named runscript. We
are keeping a backward compatibility symlink for now, but this allows
Debian or any other distro to safely remove the symlink.

X-Gentoo-Bug: 494220
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220
2013-12-29 22:57:31 -06:00
Andrew Gregory
8a44067838 Fix shebangs in services to point to the correct location of runscript
SBINDIR and BINDIR can be set independently of PREFIX.  This fixes
broken shebangs in service files when SBINDIR is set to something other
than PREFIX/sbin

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2013-02-23 20:30:39 -06:00
William Hubbs
e641b43849 Bring Back prefix support
We now have a team member who is interested in OpenRC on prefix, so I am
bringing it back to the main tree.
2012-07-26 10:54:48 -05:00
William Hubbs
3247184d86 Remove prefix support
I spoke with the prefix team sometime back and was told that they do not
have an interest in using OpenRC on prefix systems.
2012-02-21 07:27:16 -06:00
Mike Frysinger
ef1ff1b4f2 make shell math operations style more succulent
Convert the style:
	var=$((${var} + 1))
to:
	: $(( var += 1 ))

The latter is easier to read imo.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-19 02:25:36 -05:00
Mike Frysinger
49f1a8702b eat trailing whitespace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-04 18:27:00 -04:00
Robin H. Johnson
be990b308a Bug 373808: init.d/modules skipped certain variable combinations
The version iteration code missed certain combinations:
KV=1.2.3.4
skips: 1.2.3, 1
KV=1.2.3
skips: 1

Simplify the code to use a loop and build the list of versions directly
instead of unique variables per version component.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-07-04 07:48:51 +00:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
Roy Marples
95ee39ab1c Add support for Linux Containers, fixes #202.
Patch by bug reporter.
2009-11-04 19:21:24 +00:00
Roy Marples
b4104957b1 We should use -feature instead of nofeature.
This matches the ifconfig and Gentoo USE flag syntax and is hopefully
easier to read.
Fixes #178.
2009-07-01 00:07:32 +01:00
Roy Marples
658a220638 Add (c) to Copyright 2009-05-01 15:11:40 +01:00
Roy Marples
e70a142956 Style. 2009-04-27 07:51:18 +00:00
Roy Marples
90d175ae27 Remove deprecated use of modprobe -l. If we need this functionaltiy back, we need to use something else, like say find. 2008-11-04 17:08:35 +00:00
Roy Marples
1f227d62bf Allow renaming of modules, #103 thanks to Sven. 2008-08-19 15:25:06 +00:00
Roy Marples
fc7e6a3ada Fix module args per kernel version. 2008-03-25 14:35:36 +00:00
Roy Marples
55eb3794fb Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS. 2008-03-25 14:06:05 +00:00