Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbfc14040a | ||
|
|
1522eaf28b | ||
|
|
eff1f12e5c | ||
|
|
484e6089b9 | ||
|
|
8b3efa6ae2 | ||
|
|
d1161c8aae | ||
|
|
528bfa13f9 | ||
|
|
5f1daa6f30 | ||
|
|
0445bc13f8 | ||
|
|
73d024228d | ||
|
|
4809bc249f | ||
|
|
1478552071 | ||
|
|
8aa0b5b8a9 | ||
|
|
c8059c8474 | ||
|
|
b888f1a8e2 | ||
|
|
6e0bd2deb1 | ||
|
|
cdc42d91db | ||
|
|
bd4cafbbf3 | ||
|
|
61e211c1c4 | ||
|
|
40d3795fba | ||
|
|
fa39271d7a | ||
|
|
0077e54146 | ||
|
|
871fa56baa | ||
|
|
53f6bd3690 | ||
|
|
6074cbd651 | ||
|
|
8b9ea8b9e6 | ||
|
|
c47b497483 | ||
|
|
977811563d | ||
|
|
47aa0b93cd | ||
|
|
f680c89c26 |
374
ChangeLog
374
ChangeLog
@@ -1,3 +1,237 @@
|
||||
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>
|
||||
|
||||
init.d: initial service adjustments for docker support
|
||||
|
||||
Add -docker keyword to the same scripts that have -lxc keyword.
|
||||
|
||||
commit 40d3795fbacc70349a52efc670a22458f4e2d7c4
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
librc: fix Docker auto detection
|
||||
|
||||
The original auto detection of Docker containers assumed the presence of
|
||||
a container environment variable. However, Docker-1.12 does not
|
||||
implement this, and I'm not sure which versions of docker implemented
|
||||
it.
|
||||
|
||||
The new test is for the presence of a file named .dockerenv in the
|
||||
root directory.
|
||||
|
||||
commit fa39271d7a979ec8c1cf9c694d256456528baaf8
|
||||
Author: Doug Freed <dwfreed@mtu.edu>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
rc-logger: refuse to cat TMPLOG into itself
|
||||
|
||||
This prevents an infinite loop in case somebody decides to set
|
||||
rc_log_path to match TMPLOG.
|
||||
|
||||
commit 0077e54146c0c6180769bb5fa2d8da2924038baa
|
||||
Author: Julian Ospald <hasufell@posteo.de>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Build: fix hardcoded pkg-config invocation
|
||||
|
||||
This fixes #89.
|
||||
|
||||
commit 871fa56baaa0f1ae2b6531303f73f18acd74a71e
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
version 0.21.3
|
||||
|
||||
commit 53f6bd369057fd0f48c6ecfa813d35bfe47196cd
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
update changelog
|
||||
|
||||
commit 6074cbd651da7f27fc6fbc20a66f651c2577857b
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
hwclock: always use --noadjfile if available
|
||||
|
||||
When we use the --utc or --localtime switch, also use --noadjfile if it
|
||||
is available. This means hwclock will not use a drift file.
|
||||
|
||||
X-Gentoo-Bug: 584722
|
||||
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=584722
|
||||
|
||||
commit 8b9ea8b9e6631d5cd987a7cb31560aa5a13c060b
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
version 0.21.2
|
||||
|
||||
commit c47b497483040107263c9b9984474db5c569485b
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
update changelog
|
||||
|
||||
commit 977811563dd93cab7a64caefa0e86f5b864fc04f
|
||||
Author: Benda Xu <heroxbd@gentoo.org>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Fix PATH for Prefix.
|
||||
|
||||
1. remove default /bin:/sbin:/usr/bin:/usr/sbin
|
||||
2. PKG_PREFIX should be defaulted to $(PREFIX)/usr
|
||||
3. LOCAL_PREFIX should be defaulted to $(PREFIX)/usr/local
|
||||
|
||||
X-Gentoo-Bug:583634
|
||||
X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=583634
|
||||
|
||||
commit 47aa0b93cdf14253c3a75b4feefabe97c43cbf8a
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
fstabinfo/mountinfo: ensure /etc/fstab exists before calling setmntent
|
||||
|
||||
This is based on a patch by A. Wilcox <awilfox.gentoo@foxkit.us>.
|
||||
|
||||
X-Gentoo-Bug: 478226
|
||||
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478226
|
||||
|
||||
X-Gentoo-Bug: 478226
|
||||
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478226
|
||||
|
||||
commit f680c89c26709164934ee72534af7a3960166cf3
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
version 0.21.1
|
||||
|
||||
commit 5bfb7d6c77ff533e34e2bbfe5b6e57410d961d70
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Update ChangeLog
|
||||
|
||||
commit 12c8248b5f53879935d4e62ef42023f703c7b636
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
@@ -945,143 +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.
|
||||
|
||||
commit eeadca0b8a5b87c26e60a58563251604350a7a3b
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Add EERROR_QUIET and EINFO_QUIET to environment whitelist
|
||||
|
||||
commit dde339070b4850dc1fadf4992cc01d3468992106
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Increment version
|
||||
|
||||
commit 1736be3bc3ebbc1440f87b49fc353e81fb0a6037
|
||||
Author: Doug Freed <dwfreed@mtu.edu>
|
||||
Commit: Doug Freed <dwfreed@mtu.edu>
|
||||
|
||||
savecache: Fix unable to create cache message
|
||||
|
||||
The cache is created in $RC_LIBEXECDIR, not $RC_SVCDIR, so fix the error
|
||||
message when we fail to create it to match.
|
||||
|
||||
commit a36a635b016a7427dd1739a26c951fedf22f0dec
|
||||
Author: Mike Gilbert <floppym@gentoo.org>
|
||||
Commit: Doug Freed <dwfreed@mtu.edu>
|
||||
|
||||
tmpfiles: Recognize type 'v' (create btrfs subvol)
|
||||
|
||||
This change does NOT implement btrfs subvol creation. Instead, it
|
||||
treats 'v' the same as 'd', which is an acceptable fallback
|
||||
according to the manual.
|
||||
|
||||
Fixes #58
|
||||
|
||||
commit 9310ccc06bcadd8897aed51cd51c94fccb7d9c07
|
||||
Author: Mike Gilbert <floppym@gentoo.org>
|
||||
Commit: Doug Freed <dwfreed@mtu.edu>
|
||||
|
||||
Remove execute bit from tmpfiles.sh.in
|
||||
|
||||
commit 0c2e4eb3cd7935d375b74099a3a9a5fe519e6cab
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Update ChangeLog
|
||||
|
||||
commit d2ce07e227ec95370e8aee5f1199edc6ad61aff9
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Add rc-sstat script
|
||||
|
||||
The rc-sstat script is written to display status of s6 services and
|
||||
run rc-status to display all services status.
|
||||
|
||||
This currently only works on Linux.
|
||||
|
||||
commit b209fe3859c05c286037843bb34058f849c54b15
|
||||
Author: Mike Gilbert <floppym@gentoo.org>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
bootmisc: Don't call dmesg in systemd-nspawn containers
|
||||
|
||||
This fixes #57.
|
||||
|
||||
commit c94c8288cd5217b01c24d6f048c64ebbc30bee02
|
||||
Author: Mike Frysinger <vapier@gentoo.org>
|
||||
Commit: Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
fix link to s6 website
|
||||
|
||||
commit bcb9c44e73ccf332c7c961a6f82520699c6e776d
|
||||
Author: Mike Gilbert <floppym@gentoo.org>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
man: Document the stopsig variable
|
||||
|
||||
This variable can be used to set the signal to send if the service is
|
||||
using start-stop-daemon.
|
||||
|
||||
This fixes #56
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.21
|
||||
VERSION= 0.21.7
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
13
NEWS.md
13
NEWS.md
@@ -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
1
init.d/.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
binfmt
|
||||
modules-load
|
||||
bootmisc
|
||||
fsck
|
||||
hostname
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -15,7 +15,7 @@ depend()
|
||||
{
|
||||
after procfs
|
||||
use modules devfs
|
||||
keyword -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -15,7 +15,7 @@ depend()
|
||||
{
|
||||
need localmount termencoding
|
||||
after hotplug bootmisc modules
|
||||
keyword -openvz -prefix -systemd-nspawn -uml -vserver -xenu -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -15,7 +15,7 @@ depend()
|
||||
{
|
||||
provide dev-mount
|
||||
before dev
|
||||
keyword -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -lxc -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
mount_dev()
|
||||
|
||||
@@ -14,7 +14,7 @@ description="Set the dmesg level for a cleaner boot"
|
||||
depend()
|
||||
{
|
||||
before dev modules
|
||||
keyword -lxc -prefix -systemd-nspawn -vserver
|
||||
keyword -docker -lxc -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -16,7 +16,7 @@ _IFS="
|
||||
depend()
|
||||
{
|
||||
use dev clock modules
|
||||
keyword -jail -openvz -prefix -systemd-nspawn -timeout -vserver -lxc -uml
|
||||
keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -timeout -vserver -uml
|
||||
}
|
||||
|
||||
_abort() {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
description="Sets the hostname of the machine."
|
||||
|
||||
depend() {
|
||||
keyword -prefix -systemd-nspawn -lxc
|
||||
keyword -docker -lxc -prefix -systemd-nspawn
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -35,7 +35,7 @@ depend()
|
||||
else
|
||||
before *
|
||||
fi
|
||||
keyword -openvz -prefix -systemd-nspawn -uml -vserver -xenu -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
|
||||
}
|
||||
|
||||
setupopts()
|
||||
@@ -69,6 +69,16 @@ _hwclock()
|
||||
return 1
|
||||
}
|
||||
|
||||
get_noadjfile()
|
||||
{
|
||||
if ! yesno $clock_adjfile; then
|
||||
# Some implementations don't handle adjustments
|
||||
if LC_ALL=C hwclock --help 2>&1 | grep -q "\-\-noadjfile"; then
|
||||
echo --noadjfile
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
local retval=0 errstr=""
|
||||
@@ -91,16 +101,16 @@ start()
|
||||
fi
|
||||
|
||||
# Always set the kernel's time zone.
|
||||
_hwclock --systz $utc_cmd $clock_args
|
||||
_hwclock --systz $utc_cmd $(get_noadjfile) $clock_args
|
||||
: $(( retval += $? ))
|
||||
|
||||
if [ -e /etc/adjtime ] && yesno $clock_adjfile; then
|
||||
_hwclock --adjust $utc_cmd
|
||||
_hwclock --adjust $utc_cmd $(get_noadjfile)
|
||||
: $(( retval += $? ))
|
||||
fi
|
||||
|
||||
if yesno ${clock_hctosys:-YES}; then
|
||||
_hwclock --hctosys $utc_cmd $clock_args
|
||||
_hwclock --hctosys $utc_cmd $(get_noadjfile) $clock_args
|
||||
: $(( retval += $? ))
|
||||
fi
|
||||
|
||||
@@ -122,14 +132,7 @@ stop()
|
||||
|
||||
ebegin "Setting hardware clock using the system clock" "[$utc]"
|
||||
|
||||
if ! yesno $clock_adjfile; then
|
||||
# Some implementations don't handle adjustments
|
||||
if LC_ALL=C hwclock --help 2>&1 | grep -q "\-\-noadjfile"; then
|
||||
utc_cmd="$utc_cmd --noadjfile"
|
||||
fi
|
||||
fi
|
||||
|
||||
_hwclock --systohc $utc_cmd $clock_args
|
||||
_hwclock --systohc $utc_cmd $(get_noadjfile) $clock_args
|
||||
retval=$?
|
||||
|
||||
eend $retval "Failed to sync clocks"
|
||||
@@ -144,5 +147,5 @@ save()
|
||||
show()
|
||||
{
|
||||
setupopts
|
||||
hwclock --show "$utc_cmd" $clock_args
|
||||
hwclock --show "$utc_cmd" $(get_noadjfile) $clock_args
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ depend()
|
||||
{
|
||||
need localmount termencoding
|
||||
after bootmisc
|
||||
keyword -openvz -prefix -systemd-nspawn -uml -vserver -xenu -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -16,7 +16,7 @@ depend()
|
||||
need fsck
|
||||
use lvm modules mtab
|
||||
after lvm modules
|
||||
keyword -jail -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
72
init.d/modules-load.in
Normal file
72
init.d/modules-load.in
Normal 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
|
||||
}
|
||||
@@ -14,7 +14,8 @@ description="Loads a user defined list of kernel modules."
|
||||
depend()
|
||||
{
|
||||
use isapnp
|
||||
keyword -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
want modules-load
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -14,7 +14,7 @@ description="Re-mount filesytems read-only for a clean reboot."
|
||||
depend()
|
||||
{
|
||||
need killprocs savecache
|
||||
keyword -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -15,7 +15,7 @@ depend()
|
||||
{
|
||||
after modules
|
||||
need sysfs
|
||||
keyword -jail -lxc -openvz -prefix -systemd-nspawn -uml -vserver
|
||||
keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -uml -vserver
|
||||
}
|
||||
|
||||
get_interfaces()
|
||||
|
||||
@@ -24,7 +24,7 @@ depend()
|
||||
want $mywant
|
||||
use afc-client amd openvpn
|
||||
use dns
|
||||
keyword -jail -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -16,7 +16,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
|
||||
depend()
|
||||
{
|
||||
need localmount
|
||||
keyword -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
_setleds()
|
||||
|
||||
@@ -15,7 +15,7 @@ depend()
|
||||
{
|
||||
use modules devfs
|
||||
need localmount
|
||||
keyword -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -14,7 +14,7 @@ description="Mount the root fs read/write"
|
||||
depend()
|
||||
{
|
||||
need fsck
|
||||
keyword -jail -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
depend()
|
||||
{
|
||||
before localmount
|
||||
keyword -jail -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
depend()
|
||||
{
|
||||
need localmount
|
||||
keyword -jail -openvz -prefix -systemd-nspawn -vserver -lxc
|
||||
keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
start()
|
||||
|
||||
@@ -15,7 +15,7 @@ depend()
|
||||
{
|
||||
before *
|
||||
provide clock
|
||||
keyword -openvz -prefix -systemd-nspawn -uml -vserver -xenu -lxc
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
|
||||
}
|
||||
|
||||
# swclock is an OpenRC built in
|
||||
|
||||
@@ -15,7 +15,7 @@ sysfs_opts=nodev,noexec,nosuid
|
||||
|
||||
depend()
|
||||
{
|
||||
keyword -lxc -prefix -systemd-nspawn -vserver
|
||||
keyword -docker -lxc -prefix -systemd-nspawn -vserver
|
||||
}
|
||||
|
||||
mount_sys()
|
||||
|
||||
@@ -16,7 +16,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
|
||||
|
||||
depend()
|
||||
{
|
||||
keyword -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
|
||||
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
|
||||
use root
|
||||
after bootmisc
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ description="Initializes the random number generator."
|
||||
depend()
|
||||
{
|
||||
need localmount
|
||||
keyword -jail -lxc -openvz -prefix -systemd-nspawn
|
||||
keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn
|
||||
}
|
||||
|
||||
save_seed()
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
|
||||
ifeq (${MKPREFIX},yes)
|
||||
CPPFLAGS+= -DPREFIX
|
||||
PKG_PREFIX?= $(PREFIX)/usr
|
||||
SED_EXTRA= -e '/_PATH=.*usr.bin/d'
|
||||
endif
|
||||
|
||||
2
mk/os.mk
2
mk/os.mk
@@ -13,7 +13,7 @@
|
||||
_OS_SH= uname -s | tr '/' '-'
|
||||
_OS:= $(shell ${_OS_SH})
|
||||
OS?= ${_OS}
|
||||
include ${MK}/os-${OS}.mk
|
||||
include ${MK}/os-prefix.mk
|
||||
include ${MK}/os-${OS}.mk
|
||||
|
||||
RC_LIB= /$(LIBNAME)/rc
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
AR?= ar
|
||||
CP?= cp
|
||||
PKG_CONFIG?= pkg-config
|
||||
ECHO?= echo
|
||||
INSTALL?= install
|
||||
RANLIB?= ranlib
|
||||
@@ -26,7 +27,7 @@ ifeq (${MKPREFIX},yes)
|
||||
UPREFIX= ${PREFIX}/usr
|
||||
endif
|
||||
endif
|
||||
LOCAL_PREFIX= /usr/local
|
||||
LOCAL_PREFIX= $(UPREFIX)/local
|
||||
|
||||
PICFLAG?= -fPIC
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
ifeq (${MKTERMCAP},ncurses)
|
||||
TERMCAP_CFLAGS:= $(shell pkg-config ncurses --cflags 2> /dev/null)
|
||||
LTERMCAP:= $(shell pkg-config ncurses --libs 2> /dev/null)
|
||||
TERMCAP_CFLAGS:= $(shell ${PKG_CONFIG} ncurses --cflags 2> /dev/null)
|
||||
LTERMCAP:= $(shell ${PKG_CONFIG} ncurses --libs 2> /dev/null)
|
||||
ifeq ($(LTERMCAP),)
|
||||
LIBTERMCAP?= -lncurses
|
||||
else
|
||||
|
||||
@@ -285,6 +285,9 @@ detect_container(const char *systype)
|
||||
return RC_SYS_RKT;
|
||||
else if (file_regex("/proc/1/environ", "container=systemd-nspawn"))
|
||||
return RC_SYS_SYSTEMD_NSPAWN;
|
||||
else if (exists("/.dockerenv"))
|
||||
return RC_SYS_DOCKER;
|
||||
/* old test, I'm not sure when this was valid. */
|
||||
else if (file_regex("/proc/1/environ", "container=docker"))
|
||||
return RC_SYS_DOCKER;
|
||||
#endif
|
||||
|
||||
@@ -178,6 +178,9 @@ int main(int argc, char **argv)
|
||||
FILE *fp;
|
||||
#endif
|
||||
|
||||
/* fail if there is no /etc/fstab */
|
||||
if (!exists("/etc/fstab"))
|
||||
eerrorx("/etc/fstab does not exist");
|
||||
/* Ensure that we are only quiet when explicitly told to be */
|
||||
unsetenv("EINFO_QUIET");
|
||||
|
||||
|
||||
@@ -297,6 +297,9 @@ getmntfile(const char *file)
|
||||
struct mntent *ent = NULL;
|
||||
FILE *fp;
|
||||
|
||||
if (!exists("/etc/fstab"))
|
||||
return NULL;
|
||||
|
||||
fp = setmntent("/etc/fstab", "r");
|
||||
while ((ent = getmntent(fp)))
|
||||
if (strcmp(file, ent->mnt_dir) == 0)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -247,6 +247,10 @@ rc_logger_open(const char *level)
|
||||
logfile = rc_conf_value("rc_log_path");
|
||||
if (logfile == NULL)
|
||||
logfile = DEFAULTLOG;
|
||||
if (!strcmp(logfile, TMPLOG)) {
|
||||
eerror("Cowardly refusing to concatenate a logfile into itself.");
|
||||
eerrorx("Please change rc_log_path to something other than %s to get rid of this message", TMPLOG);
|
||||
}
|
||||
|
||||
if ((plog = fopen(logfile, "ae"))) {
|
||||
if ((log = fopen(TMPLOG, "re"))) {
|
||||
|
||||
Reference in New Issue
Block a user