Compare commits

...

17 Commits

Author SHA1 Message Date
William Hubbs
fbfc14040a update ChangeLog 2016-08-31 11:26:56 -05:00
William Hubbs
1522eaf28b version 0.21.7 2016-08-31 10:38:22 -05:00
William Hubbs
eff1f12e5c update ChangeLog 2016-08-31 08:46:06 -05:00
Martin Väth
484e6089b9 Fix typo in RC_UNAME check of modules-load
The $RC_UNAME "Linux" had been misspelled as "linux".
As a consequence, entries in e.g. /etc/modules-load.d failed to
load any module succesfully under Linux(!)
2016-08-31 08:38:07 -05:00
William Hubbs
8b3efa6ae2 version 0.21.6 2016-08-30 21:12:39 -05:00
William Hubbs
d1161c8aae update ChangeLog 2016-08-30 09:11:28 -05:00
William Hubbs
528bfa13f9 another news typo fix 2016-08-30 09:08:17 -05:00
Doug Freed
5f1daa6f30 modules-load: handle comments better
This handles comments without a trailing space after the comment
character.

Reported-By: josef64
2016-08-26 15:31:59 -04:00
William Hubbs
0445bc13f8 typo fix 2016-08-26 13:36:53 -04:00
Doug Freed
73d024228d version 0.21.5 2016-08-26 13:36:11 -04:00
William Hubbs
4809bc249f update changelog 2016-08-25 17:45:58 -05:00
William Hubbs
1478552071 Update news file
Add information on modules-load service and more explanation about
dealing with the rc -> openrc and runscript -> openrc-run transitions.
2016-08-25 17:36:12 -05:00
William Hubbs
8aa0b5b8a9 init.d: add modules-load to ignore patterns 2016-08-25 17:02:14 -05:00
William Hubbs
c8059c8474 modules-load.d: cleanups
Move list of directories to a local variable and create the fn variable
to use for an individual file name rather than using path.
2016-08-25 16:58:46 -05:00
William Hubbs
b888f1a8e2 Add modules-load.d support 2016-08-25 16:58:46 -05:00
William Hubbs
6e0bd2deb1 openrc-run: make runscript warning respect quiet option
X-Gentoo-Bug: 591414
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=591414
2016-08-25 11:51:26 -05:00
William Hubbs
cdc42d91db version 0.21.4 2016-08-25 11:48:05 -05:00
8 changed files with 213 additions and 65 deletions

179
ChangeLog
View File

@@ -1,3 +1,123 @@
commit 1522eaf28b7a75a1a3a0e25bb6b9828172460451
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.21.7
commit eff1f12e5c51ceaf6a3451b90488524024b6f728
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit 484e6089b90ffef9f53bdc8968c240e1b3a3f221
Author: Martin Väth <martin@mvath.de>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Fix typo in RC_UNAME check of modules-load
The $RC_UNAME "Linux" had been misspelled as "linux".
As a consequence, entries in e.g. /etc/modules-load.d failed to
load any module succesfully under Linux(!)
commit 8b3efa6ae25dd07350bff22a998575d9f38b15c9
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.21.6
commit d1161c8aaec80ae7d0064f45d69b62694cd3d365
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit 528bfa13f9bac4797e4238d05edcfbc996a6be72
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
another news typo fix
commit 5f1daa6f30849d95db1f6b4b84abdc9645db3f94
Author: Doug Freed <dwfreed@mtu.edu>
Commit: Doug Freed <dwfreed@mtu.edu>
modules-load: handle comments better
This handles comments without a trailing space after the comment
character.
Reported-By: josef64
commit 0445bc13f84cd22c06c80464d51ab18651d42147
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: Doug Freed <dwfreed@mtu.edu>
typo fix
commit 73d024228d13c423939cc0eb2aa4be75e1481fc3
Author: Doug Freed <dwfreed@mtu.edu>
Commit: Doug Freed <dwfreed@mtu.edu>
version 0.21.5
commit 4809bc249f53f519d93fa7a7c444c4f9625061ac
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update changelog
commit 147855207199970aa0a10ffa6575e980ffb3bdb8
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Update news file
Add information on modules-load service and more explanation about
dealing with the rc -> openrc and runscript -> openrc-run transitions.
commit 8aa0b5b8a943ad4d94de08a00bc0cbf1530847ee
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d: add modules-load to ignore patterns
commit c8059c8474cb0aeb6f7f89f7200f5faa73f9a66e
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
modules-load.d: cleanups
Move list of directories to a local variable and create the fn variable
to use for an individual file name rather than using path.
commit b888f1a8e21008f45105ad2fdc84a5d579892eb5
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Add modules-load.d support
commit 6e0bd2deb1efb49fd1f1db54f7d57b2a462ccf82
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
openrc-run: make runscript warning respect quiet option
X-Gentoo-Bug: 591414
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=591414
commit cdc42d91dbc1e661ef6cbe392008e1cff926bec4
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.21.4
commit bd4cafbbf357656958298f98083f27f6381cacbf
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Update ChangeLog
commit 61e211c1c4f51fdb8babb9a70ed7ce138d71c80b
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
@@ -1059,62 +1179,3 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
The localmount/netmount services should fail if all file systems that
should mount did not mount.
commit b652752339690e10a55ae50d046f4cf2a98daf1a
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Make localmount and netmount always succeed on non-linux
commit 2a439c85bd69efc14847b4397bd6783cac051405
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
local/netmount: remove uses of -O [no]_netdev
This was causing an incompatibility with busybox, and we do not use it
in Gentoo.
commit 7341cd882fba522c1f1d183603334839bd4df7fc
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
allow localmount and netmount to fail
commit 279f1e5d1013309d99509ab4b7b57521f8a4aba4
Author: Mike Frysinger <vapier@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
binfmt: fix indent on return
commit c256a7aa80c683eca6194c80b57294e4d51c9a16
Author: Doug Freed <dwfreed@mtu.edu>
Commit: Doug Freed <dwfreed@mtu.edu>
savecache: clean up implementation
X-Gentoo-Bug: 557222
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=557222
commit 6a422982579786cb8308af04ccca6622afa06e50
Author: Jason Zaman <jason@perfinion.com>
Commit: Doug Freed <dwfreed@mtu.edu>
tmpfiles: run restorecon on the entire path
The tmpfiles "d" entry will create a full path and only the last dir in
the path will have its SELinux label set correctly. This patch will
restorecon the parents as well so that the selinux labels are correct.
eg, "d /run/libvirt/lxc", then "lxc" would have the correct SELinux
label but "libvirt" would not.
Signed-off-by: Jason Zaman <jason@perfinion.com>
commit f69833a1e17d1cf65e96a34fcc0e48caf9d90d64
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
mountinfo: fix -e and -E options
Add the -e and -E options to getoptstring so they are recognized.

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.21.3
VERSION= 0.21.7
PKG= ${NAME}-${VERSION}

13
NEWS.md
View File

@@ -17,6 +17,19 @@ these files for the setup.
The deprecation messages in 0.13.x for runscript and rc are now
made visible in preparation for the removal of these binaries in 1.0.
The steps you should take to get rid of these warnings is to run openrc
in initialization steps instead of rc and change the shebang lines in
service scripts to refer to "openrc-run" instead of "runscript".
In 0.21.4, a modules-load service was added. This works like the
equivalent service in systemd. It looks for files named *.conf first in
/usr/lib/modules-load.d, then /run/modules-load.d, then
/etc/modules-load.d. These files contain a list of modules, one per
line, which should be loaded into the kernel. If a file name appears in
/run/modules-load.d, it overrides a file of the same name in
/usr/lib/modules-load.d. A file appearing in /etc/modules-load.d
overrides a file of the same name in both previous directories.
## OpenRC-0.19
This version adds a net-online service. By default, this

1
init.d/.gitignore vendored
View File

@@ -1,4 +1,5 @@
binfmt
modules-load
bootmisc
fsck
hostname

View File

@@ -19,10 +19,10 @@ SRCS-FreeBSD= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
rpcbind.in savecore.in syslogd.in
# These are FreeBSD specific
SRCS-FreeBSD+= adjkerntz.in devd.in dumpon.in encswap.in ipfw.in \
mixer.in nscd.in powerd.in syscons.in
modules.in modules-load.in mixer.in nscd.in powerd.in syscons.in
SRCS-Linux= binfmt.in devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
killprocs.in modules.in mount-ro.in mtab.in numlock.in \
killprocs.in modules.in modules-load.in mount-ro.in mtab.in numlock.in \
procfs.in net-online.in sysfs.in termencoding.in tmpfiles.dev.in
# Generic BSD scripts

72
init.d/modules-load.in Normal file
View File

@@ -0,0 +1,72 @@
#!@SBINDIR@/openrc-run
# Copyright (c) 2016 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
description="Loads a list of modules from systemd-compatible locations."
depend()
{
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
}
find_modfiles()
{
local dirs="/usr/lib/modules-load.d /run/modules-load.d /etc/modules-load.d"
local basenames files fn x y
for x in $dirs; do
[ ! -d $x ] && continue
for y in $x/*.conf; do
[ -f $y ] && basenames="${basenames}\n${y##*/}"
done
done
basenames=$(printf "$basenames" | sort -u)
for x in $basenames; do
for y in $dirs; do
[ -r $y/$x ] &&
fn=$y/$x
done
files="$files $fn"
done
echo $files
}
load_modules()
{
local file m modules rc x
file=$1
[ -z "$file" ] && return 0
while read m x; do
case $m in
\;*) continue ;;
\#*) continue ;;
*) modules="$modules $m"
;;
esac
done < $file
for x in $modules; do
ebegin "Loading module $x"
case "$RC_UNAME" in
FreeBSD) kldload "$x"; rc=$? ;;
Linux) modprobe -q "$x"; rc=$? ;;
*) ;;
esac
eend $rc "Failed to load $x"
done
}
start()
{
local x
files=$(find_modfiles)
for x in $files; do
load_modules $x
done
return 0
}

View File

@@ -14,6 +14,7 @@ description="Loads a user defined list of kernel modules."
depend()
{
use isapnp
want modules-load
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
}

View File

@@ -1173,9 +1173,6 @@ int main(int argc, char **argv)
if (argc < 3)
usage(EXIT_FAILURE);
if (runscript)
ewarn("%s uses runscript, please convert to openrc-run.", service);
/* Change dir to / to ensure all init scripts don't use stuff in pwd */
if (chdir("/") == -1)
eerror("chdir: %s", strerror(errno));
@@ -1295,6 +1292,9 @@ int main(int argc, char **argv)
applet_list = rc_stringlist_new();
rc_stringlist_add(applet_list, applet);
if (runscript)
ewarn("%s uses runscript, please convert to openrc-run.", service);
/* Now run each option */
retval = EXIT_SUCCESS;
while (optind < argc) {