16 Commits

Author SHA1 Message Date
NRK
303bc524e8 do_unmount: add parallel unmounting
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
2025-11-12 20:27:33 +01:00
William Hubbs
01f037cced build: remove the meson_runlevels script 2025-04-29 16:58:03 +02:00
William Hubbs
a0d71145fe build: install functions.sh init.d symlink with meson 2025-04-29 16:58:03 +02:00
NRK
e56171b2a1 install agetty symlinks via meson
also adds a 'agetty' array option so that user can specify which
symlinks to create.

Closes: https://github.com/OpenRC/openrc/pull/355
2025-04-09 02:36:08 +02:00
William Hubbs
513ce77b12 build: clean up unused arguments in meson_final.sh 2024-07-23 12:52:35 -05:00
William Hubbs
466662d8c1 build: install symlinks natively with meson 2024-07-23 16:23:37 +02:00
Adam Duskett
b85d771e1f Force symlinking of openrc-init to init
When building on embedded SDKs such as Buildroot or Yocto, if OpenRC has a
previous installation, the package will fail the installation step as the
openrc-init is already a symlink to "${DESTDIR}/${sbindir}"/init. Force
symlinking to prevent errors when reinstalling the package.
2023-10-10 08:55:33 -04:00
Timothy Kenno Handojo
b2c4eb97b5 remove /lib/rc/tmp creation from meson script
It is apparently for a piece of code that no longer exist.
There don't seem to be any part of the code referring to this directory (anymore, if there was).
2023-09-01 11:54:30 -05:00
William Hubbs
107b23819d restore the init symlink for sysvinit mode
This symlink got lost in the transition to meson.

X-Gentoo-Bug: 850754
X-Gentoo-Bug-URL: https://bugs.gentoo.org/850754
2022-06-10 10:28:57 -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
William Hubbs
3908687559 fix permission of installed version file 2021-10-15 23:17:26 -05:00
Ariadne Conill
b5cf79f747 fix trailing whitespace in tools/meson_runlevels.sh 2021-09-09 02:14:59 -06:00
William Hubbs
46a0bfedd1 build: fix symlinks 2021-09-08 11:59:38 -05:00
William Hubbs
ca0270967c tools/meson_final.sh: typo fix 2021-09-06 18:37:11 -05:00
William Hubbs
d6622a1156 add meson build files
Closes #116.
Closes #171.
Closes #172.
Closes #175.
2021-09-04 16:01:29 -05:00