- drop old build system
- move shared include and source files to common directory
- drop "rc-" prefix from shared include and source files
- move executable-specific code to individual directories under src
- adjust top-level .gitignore file for new build system
This closes#489.
The RNG can't actually be seeded from a shell script, due to the
reliance on ioctls. For this reason, the seedrng project provides a
basic script meant to be copy and pasted into projects like OpenRC and
tweaked as needed: https://git.zx2c4.com/seedrng/about/
This commit imports it into OpenRC and wires up /etc/init.d/urandom to
call it. It shouldn't be called by other things on the system, so it
lives in rc_sbindir.
Closes#506.
Closes#507.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This allows containers using OpenRC based services to be configured to
allow open tcp connections to be closed before they are shut down.
This fixes#476.
The OpenRC team does not currently know of any modern linux tools that
require /etc/mtab to be a flat file, so this puts users on notice that
the mtab service will be removed in the future.
- switch from attempting to ping the default gateway to a host outside
the local network, defaulting to google.com.
- along with this, change the name of the variable that requests a ping
test to include_ping_test so the meaning is more clear.
In previous releases, we either treated no mount points as critical or
all of them.
Now both localmount and netmount support a critical_mounts setting. If
mount points listed in this setting fail to mount, localmount and
netmount will fail.
The clock_hctosys variable should be set to YES if you are not using NTP to
synchronize your system time; it doesn't have anything to do with the
kernel configuration.
- Rename the static_dev switch in conf.d/devfs to skip_mount_dev since
this is a better description of what the switch does.
- Clarify the error messages in the devfs service script based on the
new name of the switch.
A comment in this file had the actual currency and euro symbols, which
were not utf-8, so I was requested to remove them.
X-Gentoo-Bug: 494936
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494936
All Linux systems need /dev to be set up,so add code to devfs to do
this. The process devfs follows is below.
1. If static_dev is yes, nothing is done.
2. if /dev is an entry in fstab it is mounted or remounted based on that
entry.
3. If /dev is not in fstab, it attempts to mount /dev as a devtmpfs or
tmpfs depending on which is defined in the kernel; devtmpfs is
preferred.
4. If neither devtmpfs nor tmpfs is defined, it assumes the user wants
static /dev and prints a warning.
X-Gentoo-Bug: 492694
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=492694
It has been determined that it will be best for gentoo's net.* scripts
to be in a separate package to allow independent development.
This package will be called netifrc and maintained by Gentoo.
We were telling users that setting shutdown_network=YES would shut down
the network interfaces during shutdown, but this was exactly the
opposite of what we were doing. The default was YES, which was keeping
the interfaces active.
This keeps the default behavior, but renames the setting to keep_network
which more accurately describes its function, and instructs users to set
it to NO if they want the network interfaces to go down.
Currently, we have the net virtual, so we should use it as the default
in this instance so that netmount comes up after it thinks the network
is up. However, this is technically eroneous, because there is no way to
know from the init system that we really have network connectivity.
Reported-by: cheepeero@gmx.net
X-Gentoo-Bug: 445116
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=445116
Initially, we were creating tmpfiles entries in the sysinit runlevel and
again in the boot runlevel. Systemd runs the --create and --remove
options in one service called systemd-tmpfiles-setup after the local
file systems are mounted. Now we have a service called tmpfiles.setup
which emulates this.
This also closes the bug mentioned below, since we were originally
writing to files that were on read-only file systems and that were not
available.
Reported-by: <devurandom@gmx.net>
X-Gentoo-Bug: 439012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439012
Now that the tmpfiles.d code is more tested, actually call it from
init.d. It assumes that /run is already available when it runs.
Please note it runs TWICE.
- During sysinit, ideally just after /dev/shm is created, but before
udev has started. After udev is also acceptable, but not ideal.
- During boot, ideally just after localmount has completed.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
The OpenRC upstream default network stack was changed, but there was no
reason to change it. Now since we have the MKNET build switch, it is
easy for the gentoo ebuild to install oldnet by default.
The upstream default is newnet.
The MKNET variable can be used to select the network stack you want to
build and install with OpenRC.
The current default is the gentoo "oldnet" stack. If you want to install
the OpenRC newnet stack, use MKNET=newnet on the make command line.
Correct the reference in conf.d/dmesg from dmesg(8) to dmesg(1).
reported-by: <toralf.foerster@gmx.de>
X-Gentoo-Bug: 425370
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=425370
Previously, the default on linux systems was to not set the hardware
clock to match the system clock during shutdown.
This changes that default to be consistent with *bsd and swclock.
The clock_hctosys and clock_systohc settings really do not have anything
to do with running an ntp daemon, so remove that reference from the
documentation.
Reported-by: Milos Ivanovic <milosivanovic@orcon.net.nz>
X-Gentoo-Bug: 401433
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401433