Commit Graph

135 Commits

Author SHA1 Message Date
Josh Soref
3054046e18 multiple spelling and typo fixes
This fixes #516.
2022-04-30 21:32:32 -05:00
Jason A. Donenfeld
9b16bfe0e7 seedrng: incorporate various improvements
There have been a number of subtle improvements and cleanups to seedrng,
including using openat and locking the directory fd instead of a
separate lock file. Also various stylistic cleanups.

This fixes #519.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-04-20 15:45:20 -05:00
William Hubbs
391d12db48 migrate fully to meson build system
- 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.
2022-04-06 10:51:55 -05:00
William Hubbs
0fb11190fa add seedrng service for Linux
This moves urandom to *bsd only and adds seedrng as a separate service
for Linux.

This fixes #510
2022-03-30 22:07:35 -05:00
Jason A. Donenfeld
076c2552ae Use seedrng for seeding the random number generator
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>
2022-03-26 19:16:27 -05:00
William Hubbs
0eb11e7db6 killprocs: add kill_delay setting
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.
2021-12-07 13:40:15 -06:00
William Hubbs
d6622a1156 add meson build files
Closes #116.
Closes #171.
Closes #172.
Closes #175.
2021-09-04 16:01:29 -05:00
Alex Xu
1e975be896 conf.d/hostname: clarify hostname variable usage
https://gitlab.alpinelinux.org/alpine/aports/-/issues/9744

This fixes #433.
2021-08-13 13:13:14 -05: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
318e873481 strongly encourage Linux users to not make /etc/mtab a flat file
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.
2017-11-14 15:41:03 -06:00
Chris Cromer
d4ddd72701 add option to make agetty startup quiet
This fixes #150
2017-10-06 14:43:59 -05:00
John R. Graham
72bb2e57de Typo fix
X-Gentoo-Bug: 624908
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=624908
2017-07-24 17:24:13 -05:00
William Hubbs
44bac3c379 Change killprocs to use kill_all instead of killall5
X-Gentoo-Bug:376977
X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=376977
2017-05-30 18:48:33 -05:00
William Hubbs
ec27299f4b typo fix
X-Gentoo-Bug: 618888
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=618888
2017-05-22 12:52:58 -05:00
William Hubbs
d7bbb0f583 add agetty service
The agetty service is an alternate way to manage gettys with agetty
under Linux which is separate from an external init system.
2017-03-09 15:23:02 -06:00
William Hubbs
d4d0f25a48 net-online: updates to make the service more usable
- 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.
2017-02-26 13:51:50 -06:00
William Hubbs
e0ac661419 split tmpfiles processing into opentmpfiles
The openntmpfiles package is designed so that it can be used on systems
independently of whether openrc is used.
2016-12-01 12:04:54 -06:00
William Hubbs
20b60ea904 conf.d/net-online: clarify comment about interfaces setting
This setting refers to all interfaces that support ethernet
2016-11-03 11:57:40 -05:00
William Hubbs
d06db93d59 remove swapfiles service
The swapfiles service was basically a copy of the swap service, so this
commit consolidates the functionality into the swap service.

X-Funtoo-Bug-URL: https://bugs.funtoo.org/browse/FL-2523
X-Gentoo-Bug: 568162
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=568162
2016-09-05 13:39:51 -05:00
William Hubbs
2984504c88 conf.d: remove staticroute file fragments 2016-07-19 11:46:55 -05:00
William Hubbs
35e8386c24 conf.d: makestaticroute file static 2016-07-19 11:46:55 -05:00
William Hubbs
2108285d64 conf.d: remove network file fragnents 2016-07-19 11:46:30 -05:00
William Hubbs
a3133fec25 conf.d: make network file static 2016-07-19 11:46:04 -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
5d130cc45c localmount/netmount: allow mount points to be marked critical
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.
2016-04-25 12:04:34 -05:00
Gokturk Yuksek
1cb7eec31f conf.d/bootmisc: typo fix: s/dmesc/dmesg/
This fixes #72.
2016-01-19 16:22:34 -06:00
William Hubbs
cd7883d25d localmount: Allow users to control whether errors are ignored
X-Gentoo-Bug: 572138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572138
2016-01-19 13:34:04 -06:00
joe9
9473ac514c allow the user to decide whether fsck aborts for errors
X-Gentoo-Bug: 564008
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564008
2016-01-13 10:52:22 -06:00
William Hubbs
ddb895b355 conf.d/netmount: typo fix
X-Gentoo-Bug: 564846
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564846
2015-11-11 15:48:19 -06:00
William Hubbs
ee944553a9 bootmisc: optionally save the previous dmesg log
X-Gentoo-Bug: 561204
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204
2015-10-21 14:04:28 -05:00
William Hubbs
960881fcfe Add net-online service 2015-10-20 12:13:47 -05:00
William Hubbs
b29b2fb3cb mtab: make /etc/mtab as a file configurable 2015-10-14 12:19:13 -05:00
Svante Signell
203b754f84 add missing files for GNU/Hurd 2014-10-23 13:00:24 -05:00
Gabriele Giacone
d8e1d9a6ed Add missing files for GNU/kFreeBSD 2014-10-22 11:09:58 -05:00
William Hubbs
faaaab4bf5 hwclock: fix comments about the usage of clock_hctosys
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.
2014-08-10 13:00:39 -05:00
William Hubbs
6a337ff6c5 devfs: several small clarifications
- 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.
2014-08-08 14:49:00 -05:00
William Hubbs
7fb209a6fc conf.d/hwclock: typo fix 2014-03-13 15:27:40 -05:00
William Hubbs
257e10a1ab conf.d/keymaps: Remove the currency and euro symbols
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
2014-01-09 13:56:31 -06:00
William Hubbs
8352082eb6 devfs: add code to mount /dev
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
2014-01-05 11:17:05 -06:00
William Hubbs
838c9efb36 Remove gentoo's net.* scripts
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.
2013-08-13 16:33:41 -05:00
William Hubbs
5bfebbecea Rename shutdown_network setting to keep_network
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.
2013-02-11 09:45:14 -06:00
William Hubbs
8661af3223 netmount: make "net" the default network option for now
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
2012-11-29 12:34:34 -06:00
William Hubbs
1a8cd5ff9d Tmpfiles: create and delete entries once in the boot runlevel.
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
2012-10-31 17:33:14 -05:00
William Hubbs
5148047f89 netmount: drop need net from dependencies
Reported-by: <mattsch@gmail.com>
X-Gentoo-Bug: 439658
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=439658
2012-10-25 16:33:56 -05:00
Robin H. Johnson
4ff71bd741 tmpfiles.d init.d scripts
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>
2012-09-26 15:42:37 -07:00
William Hubbs
006fbdce83 fix the upstream default network stack
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.
2012-07-10 12:18:06 -05:00
William Hubbs
60d6847de5 add the MKNET variable to select a network stack
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.
2012-07-10 02:39:36 -05:00
William Hubbs
84ad14b2e4 fix reference to dmesg man page
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
2012-07-09 09:25:24 -05:00
William Hubbs
de36b26d5e fix consolefont documentation to reflect the default state
conf.d/consolefont was written as though the consolefont service was
active by default. It is not, so this has been fixed.

reported-by: Ikonta@yandex.ru
X-Gentoo-Bug: 420037
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=420037
2012-06-07 10:51:02 -05:00
William Hubbs
0fa164dff2 Clarify the meaning of the clock_hctosys variable
Reported-by: Ian Abbott <ian@abbott.org>
X-Gentoo-Bug: 405861
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=405861
2012-03-02 11:00:25 -06:00