| Age | Commit message (Collapse) | Author |
|
Now that the bug that made it fail is fixed, use the
start-stop-daemon readiness notification mechanism when
launching s6-svscan.
(We do not run s6-svscan under supervise-daemon because that
would needlessly lengthen the supervision chain. Yo dawg,
we heard you like supervisors.)
|
|
Bug: https://github.com/OpenRC/openrc/issues/890
Fixes: https://github.com/OpenRC/openrc/issues/936
|
|
|
|
this turns mouninfo into a multicall binary which can also do
parallel unmounting. most mountinfo code is unchanged; only
notable change is find_mounts() now returns the number of mounts
found and also takes the "process" function as an argument; so
that is_mounted() can be implemented on top of it.
do_unmount mostly follows the logic of previous code. some
notable changes:
- do_unmount is now "lazy" when it comes to retrying failed
unmounts. it will greedily keep running unmount as long as it
can before it looks at the "waiting" queue.
- it will check if the mountpoint is still mounted or not when
umount returns non-zero exit code. this is due to the fact that
multiple umount calls might race to unmount a shared mount. so
if umount fails _but_ the mountpoint is no longer mounted, we
assume success.
- do_unmount used to fail if fuser did not find any pids using
the mount. the new code tries one more time; the rationale being
that there's a gap between the umount call and the fuser call,
and so whatever was using the mount before might have stopped
using it now and so it's worth another attempt.
Fixes: https://github.com/OpenRC/openrc/issues/662
Closes: https://github.com/OpenRC/openrc/pull/698
|
|
e21b01b97e84f81589f52e087d2b2ac53f0bf144 fixed one of the issues mentioned
in Gentoo bug #650584 but not the other one. `ping` without `-n` will perform
reverse DNS lookups for IPs which we don't want, as it introduces a delay
and confuses the calculation we make.
Bug: https://bugs.gentoo.org/650584
Bug: https://github.com/OpenRC/openrc/issues/353
|
|
for rationale, see
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9ba817fb7c6afd3c86a6d4c3b822924b87ef0348
|
|
Added a single line that allows tun/tap interfaces to be properly handled. It
turns out that /sys/class/net/${interface}/operstate shows "unknown" for tun/tap
interfaces, not "up", which is the value that net-online depends on. So tun/tap
interfaces need minor special handling.
|
|
The code that reads interface status from the sysfs had stderr redirection in
the wrong order, which means that, in the event that the interface does not yet
exist, the read will display an error message that was meant to be suppressed.
|
|
by the list in !871 it mostly seemed to match docker and similar, so for
now let's add -wsl to all services that have -docker
Closes: https://github.com/OpenRC/openrc/issues/871
|
|
to specify a different host, meson's machine files should be used
instead.
|
|
Debian GNU-kFreeBSD was the only known distribution, and they dropped
support for GNU-kFreeBSD back in 2023[1]
1: https://lists.debian.org/debian-devel/2023/07/msg00176.html
|
|
|
|
|
|
This commit modernizes the support for the supervisor=s6
backend. It reworks how the supervision tree is started and
how the services are defined.
The s6-svscan service now runs its own catch-all logger,
logging to $RC_SVCDIR/s6-logs.
A service defining supervisor=s6 now has an automatic "need"
dependency to s6-svscan. A service directory will be automatically
built from the information in the service file, under the
$RC_SVCDIR/s6-services repository. These service directories are
cached until the service file (or config) changes. So, services
don't need to provide their service directories themselves
anymore; they still can, but they'll need to do the s6-sv[un]link
thing themselves.
The documentation has been updated.
Anna, please add yourself to the AUTHORS file, because it is
ridiculous that I am now in it and you are not.
|
|
The getty symlinks are installed both in the init.d directory and the
default runlevel directory. This makes the getty installation consistent
with the rest of the runlevel setup.
|
|
|
|
this reverts commit 1146ee616c55751db4350c389757862d67e7a1b0.
safe-guarding against new defaults in /etc/rc.conf isn't really great in
retrospect, so ideally we improve the defaults so that rc.conf presets
are not needed.
Bug: https://github.com/OpenRC/openrc/issues/852
|
|
Fixes: https://github.com/OpenRC/openrc/issues/852
|
|
some setups could actually take more than a second to fail 3 times "in a row"
Bug: https://bugs.gentoo.org/952108
|
|
it's the standard for symlinks to exist as relative pointers. absolute
symlinks at install time also triggers an issue with meson[1]
1: https://github.com/mesonbuild/meson/issues/12253
Fixes: https://github.com/OpenRC/openrc/issues/847
|
|
Ref: https://bugs.gentoo.org/952108
Ref: https://github.com/OpenRC/openrc/issues/817
|
|
eg. cilium expects /sys/fs/bpf to be mounted. systemd mounts it here as
well.
|
|
|
|
also adds a 'agetty' array option so that user can specify which
symlinks to create.
Closes: https://github.com/OpenRC/openrc/pull/355
|
|
Just a cosmetic change with no real changes, more than the visual impact
when running mount
|
|
this means users can reliably do checks like `--ifstarted status` from
profile scripts at login, and be sure certain environment variables can
be set as the listening services for them will already be running if
they're on the boot user runlevel
|
|
this avoids regenerating the deptree cache for services in there, if
they're always created
|
|
there's no point in saving a copy of softlevel, it'll always be the
runlevel 'savecache' is running under, and it'll always be re-written to
"sysinit" early at boot
|
|
instead, move caches to /var/cache/openrc. If /var is not mounted, cache
will not be used and the deptree would be regenerated
user services use ${XDG_CACHE_HOME}/rc, defaulting to ~/.cache
Closes: https://github.com/OpenRC/openrc/issues/339
|
|
This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223
|
|
|
|
|
|
containers on linux might require filesystems to be mounted with
different propagation than the kernel default of 'private':
by setting 'shared' in fstab for / options, one can now make the
fs hierarchy shared.
Note we use 'rshared' to make other existing mounts shared as well
because the setting is contagious and it seemed more logical to
behave as if the setting was set on / immediately (and thus inherited
by other mounts)
This fixes #525.
|
|
|
|
This fixes #684.
|
|
965de92b37cbe8d8670f6cc956e1d10677551e19 changed the default cgroup mode which
exposes an issue in init.d/cgroups.in.
While mount_cgroups defaults to 'unified' if rc_cgroup_mode is unset, cgroup2_controllers
has no default and therefore has a mismatch with the logic in mount_cgroups. The
two should be consistent so the flow makes sense, as mount_cgroups expects a certain
path to be taken in cgroup2_controllers.
Make cgroup2_controllers default to 'unified' if rc_cgroup_mode is unset, just
like mount_cgroups.
Bug: https://bugs.gentoo.org/916964
Thanks-to: acab@digitalfuture.it
|
|
This improves resource management by assigning services to individual
cgroups.
X-Gentoo-Bug: https://bugs.gentoo.org/914972
|
|
|
|
This fixes #565.
|
|
Starting with grep version 3.8, the hwclock init script logs warnings
about stray backslashes:
> hwclock | * Setting system clock using the hardware clock [UTC] ...
> hwclock |grep: warning: stray \ before -
> hwclock |grep: warning: stray \ before -
This is caused by the check for existence of the `--noadjfile` argument
in function `get_noadjfile()`.
Replacing the affected logic with an explicit argument denoting the
pattern as such resolves the issue.
Fixes #548
|
|
While refactoring the changes proposed in #533 a minor error was
introduced were the root service will now attempt to remount swap.
This will fail with the error message `mountinfo: 'swap' is not a
mountpoint`.
This fixes #546
|
|
Without this commit, the root OpenRC service remounts all mounted
filesystems (except /) with the options defined in /etc/fstab via
fstabinfo. It is presently unclear to me why / was excluded from
remounting in 497ff7ee41168d863971efb52e2ca6b42f765832 and unfortunately
neither the commit nor the associated Bugzilla issue [1] provides
further information on this.
At Alpine, our initramfs does currently not remount / with all options
defined in /etc/fstab [2]. As part of the discussion on the Alpine side
of things we wondered why OpenRC does not remount / since this would be
the easier solution for us. For this reason, this commit changes the
behavior of the OpenRC root services accordingly to also remount / with
the options defined in /etc/fstab.
[1]: https://bugs.gentoo.org/401573
[2]: https://gitlab.alpinelinux.org/alpine/mkinitfs/-/merge_requests/103
This fixes #533.
|
|
|
|
|
|
- use _ throw-away variable to get rid of a shellcheck warning
- remove tests for /etc/hostname and just try to read it
- drop reference to bash HOSTNAME variable.
- make source of host name more accurate
X-Gentoo-Bug: 850577
X-Gentoo-Bug-URL: https://bugs.gentoo.org/850577
|
|
This fixes #516.
|
|
The value of ${seed_dir} may have spaces in it, making the current
argument string building method unsafe. Instead, use positional
parameters to pass these arguments safely.
|
|
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>
|
|
- 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.
|
|
This fixes #512.
|