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
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.
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).
- 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.