| Newsgroups |
gmane.linux.lfs.book |
| Message-ID |
<177587080294.20346.1736499901418879673@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch multilib
in repository lfs.
The following commit(s) were added to refs/heads/multilib by this push:
new 15b4d4161 (cherry-picked) OpenRC: Don't reinstall conf files if applicable.
15b4d4161 is described below
commit 15b4d41619aa8b56d4bc3a3e301e109cb46a412b
Author: Zeckmathederg <[email protected]>
AuthorDate: Fri Apr 10 19:22:23 2026 -0600
(cherry-picked) OpenRC: Don't reinstall conf files if applicable.
By default, the OpenRC installation will reinstall the configuration
files for the base services. There are several reasons why this wouldn't be
desirable. For existance, after an OpenRC upgrade, there's a new error
before login, but agetty now clears the screen with a login prompt when
it previously didn't clear the screen because of the altered
configuration. That's just one example.
The reason for the bin and sbin nonsense is that an OpenRC installation
wants to install /sbin and /bin, but cp doesn't want to overwrite them
as they are symlinks, not directories, and some binaries will be busy,
preventing overwriting. Thus, the instructions balloon up even more. If
anyone has suggestions on how to make the instructions both shorter and
understandable, please let me know.
---
chapter08/openrc.xml | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/chapter08/openrc.xml b/chapter08/openrc.xml
index 91e561191..c17e4ef89 100644
--- a/chapter08/openrc.xml
+++ b/chapter08/openrc.xml
@@ -77,8 +77,33 @@ meson setup --prefix=/usr \
<para>Install the package:</para>
-<screen><userinput remap="install">ninja install &&
-mv -v /sbin/rc-update /bin</userinput></screen>
+<screen><userinput remap="install">DESTDIR=$PWD/DESTDIR ninja install
+
+mv -v DESTDIR/{s,}bin/rc-update
+mv -v DESTDIR/{s,}bin DESTDIR/usr
+install -vDm755 DESTDIR/usr/bin/* -t /usr/bin/
+install -vDm755 DESTDIR/usr/sbin/* -t /usr/sbin/
+rm -rf DESTDIR/usr/{s,}bin
+
+for conf in DESTDIR/etc/conf.d/*; do
+ if [ ! -e /etc/conf.d/$(basename $conf) ]; then
+ install -vDm644 $conf -t /etc/conf.d/
+ fi
+ rm -f $conf
+done
+
+cp -vR DESTDIR/* /
+rm -rf DESTDIR</userinput></screen>
+
+ <note><para>
+ OpenRC by default reinstalls the configuration files for the base
+ services, meaning that if you have configured a service like
+ <literal>agetty</literal>, a normal installation would have reset the
+ configuration to the default. The above ensures that doesn't happen when
+ applicable. The <command>rc-update</command> under some circumstances is
+ meant to be ran as a normal user as well, so it should be in <filename
+ class="directory">/usr/bin</filename>.
+ </para></note>
<para>OpenRC provides <application>init</application> and other programs of
its own. However, the shorthands for them aren't created. Create the
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page