treewide: Use <ulink> instead of <filename> for man pages

"gcc(1)" is really not a file name.

Use <ulink> and link to the online man page on
https://man.archlinux.org/ so the user can refer to the man pages more
easily.

The change is done via a sed command and long lines are wrapped
manually.
This commit is contained in:
Xi Ruoyao 2024-01-26 01:49:29 +08:00
parent 9ac6ff55fc
commit ea93c117f2
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
16 changed files with 60 additions and 37 deletions

View File

@ -40,7 +40,8 @@
<filename class="devicefile">/dev/sda</filename> for the primary
disk drive. Create a Linux native partition and a
<systemitem class="filesystem">swap</systemitem> partition, if needed. Please
refer to <filename>cfdisk(8)</filename> or <filename>fdisk(8)</filename> if
refer to <ulink role='man' url='&man;cfdisk.8'>cfdisk(8)</ulink> or
<ulink role='man' url='&man;fdisk.8'>fdisk(8)</ulink> if
you do not yet know how to use the programs.</para>
<note><para>For experienced users, other partitioning schemes are possible.

View File

@ -99,6 +99,7 @@ esac</userinput></screen>
<para>The <quote><parameter>-</parameter></quote> instructs
<command>su</command> to start a login shell as opposed to a non-login shell.
The difference between these two types of shells is described in detail in
<filename>bash(1)</filename> and <command>info bash</command>.</para>
<ulink role='man' url='&man;bash.1'>bash(1)</ulink> and <command>info
bash</command>.</para>
</sect1>

View File

@ -79,8 +79,8 @@ EOF</userinput></screen>
<para>Setting the user file-creation mask (umask) to 022 ensures that newly
created files and directories are only writable by their owner, but are
readable and executable by anyone (assuming default modes are used by the
<filename>open(2)</filename> system call, new files will end up with
permission mode 644 and directories with mode 755).</para>
<ulink role='man' url='&man;open.2'>open(2)</ulink> system call, new files
will end up with permission mode 644 and directories with mode 755).</para>
</listitem>
</varlistentry>

View File

@ -59,8 +59,9 @@ esac</userinput></screen>
<para>
The above command is correct. The <command>ln</command> command has
several syntactic versions, so be sure to check
<command>info coreutils ln</command> and <filename>ln(1)</filename>
before reporting what may appear to be an error.
<command>info coreutils ln</command> and <ulink role='man'
url='&man;ln.1'>ln(1)</ulink> before reporting what may appear to be
an error.
</para>
</note>

View File

@ -159,7 +159,8 @@ install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info</userin
<screen role='nodump'><userinput>sed 's/metadata_csum_seed,//' -i /etc/mke2fs.conf</userinput></screen>
<para>
Read the man page <filename>mke2fs.conf(5)</filename> for details.
Read the man page <ulink role='man'
url='&man;mke2fs.conf.5'>mke2fs.conf(5)</ulink> for details.
</para>
</sect2>

View File

@ -163,7 +163,7 @@ make MANSUFFIX=ssl install</userinput></screen>
is a command-line tool for using the various cryptography functions
of <application>OpenSSL</application>'s crypto library from the
shell. It can be used for various functions which are documented in
<filename>openssl(1)</filename>
<ulink role='man' url='&man;openssl.1'>openssl(1)</ulink>
</para>
<indexterm zone="ch-system-openssl openssl-prog">
<primary sortas="b-openssl">openssl</primary>
@ -195,7 +195,8 @@ make MANSUFFIX=ssl install</userinput></screen>
<para>
implements the Transport Layer Security (TLS v1) protocol.
It provides a rich API, documentation
on which can be found in <filename>ssl(7)</filename>
on which can be found in <ulink role='man'
url='&man;ssl.7'>ssl(7)</ulink>
</para>
<indexterm zone="ch-system-openssl libssl">
<primary sortas="c-libssl">libssl.so</primary>

View File

@ -203,8 +203,8 @@ make -C man install-man</userinput></screen>
to pass either the <parameter>-g</parameter> or <parameter>-N</parameter>
parameter to <command>useradd</command>, or else change the setting of
<parameter>USERGROUPS_ENAB</parameter> in
<filename>/etc/login.defs</filename>. See <filename>useradd(8)</filename>
for more information.</para>
<filename>/etc/login.defs</filename>. See <ulink role='man'
url='&man;useradd.8'>useradd(8)</ulink> for more information.</para>
<para>Second, to change the default parameters, the file
<filename>/etc/default/useradd</filename> must be created and tailored

View File

@ -584,7 +584,8 @@ su tester -c "make -k check"</userinput></screen>
<term><command>irqtop</command></term>
<listitem>
<para>Displays kernel interrupt counter information in
<filename>top(1)</filename> style view</para>
<ulink role='man' url='&man;top.1'>top(1)</ulink> style
view</para>
<indexterm zone="ch-system-util-linux irqtop">
<primary sortas="b-irqtop">irqtop</primary>
</indexterm>

View File

@ -50,9 +50,11 @@
<filename class="extension">.netdev</filename> and
<filename class="extension">.network</filename> files. For detailed
descriptions and example contents of these configuration files, consult
the <filename>systemd-link(5)</filename>,
<filename>systemd-netdev(5)</filename> and
<filename>systemd-network(5)</filename> manual pages.</para>
the <ulink role='man' url='&man;systemd-link.5'>systemd-link(5)</ulink>,
<ulink role='man' url='&man;systemd-netdev.5'>systemd-netdev(5)</ulink>,
and <ulink role='man'
url='&man;systemd-network.5'>systemd-network(5)</ulink> manual
pages.</para>
<sect3 id="systemd-network-devices">
<title>Network Device Naming</title>
@ -113,7 +115,7 @@ Name=ether0</literal>
EOF</userinput></screen>
<para>
See <filename>systemd.link(5)</filename> for more information.
See <ulink role='man' url='&man;systemd.link.5'>systemd.link(5)</ulink> for more information.
</para>
</listitem>
@ -357,7 +359,9 @@ EOF</userinput></screen>
<literal>localhost.localdomain</literal>, or the hostname (without a
domain) because they are handled by the
<systemitem class='library'>myhostname</systemitem> NSS module, read
the man page <filename>nss-myhostname(8)</filename> for details.</para>
the man page <ulink role='man'
url='&man;nss-myhostname.8'>nss-myhostname(8)</ulink> for
details.</para>
<para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents
the IPv6 loopback interface.</para>

View File

@ -21,8 +21,9 @@
of options to control basic systemd operations. The default file has all
entries commented out with the default settings indicated. This file is
where the log level may be changed as well as some basic logging settings.
See the <filename>systemd-system.conf(5)</filename> manual page for details
on each configuration option.</para>
See the <ulink role='man'
url='&man;systemd-system.conf.5'>systemd-system.conf(5)</ulink> manual
page for details on each configuration option.</para>
</sect2>
@ -89,8 +90,8 @@ EOF</userinput></screen>
<filename class="directory">/etc/tmpfiles.d</filename> override
files with the same name in
<filename class="directory">/usr/lib/tmpfiles.d</filename>. See
<filename>tmpfiles.d(5)</filename> manual page for file format
details.</para>
<ulink role='man' url='&man;tmpfiles.d.5'>tmpfiles.d(5)</ulink> manual
page for file format details.</para>
<para>
Note that the syntax for the
@ -135,7 +136,8 @@ Restart=always
RestartSec=30</literal>
EOF</userinput></screen>
<para>See <filename>systemd.unit(5)</filename> manual page for more
<para>See <ulink role='man'
url='&man;systemd.unit.5'>systemd.unit(5)</ulink> manual page for more
information. After creating the configuration file, run
<userinput>systemctl daemon-reload</userinput> and <userinput>systemctl
restart foobar</userinput> to activate the changes to a service.</para>
@ -251,10 +253,11 @@ cat &gt; /etc/systemd/coredump.conf.d/maxuse.conf &lt;&lt; EOF
MaxUse=5G</literal>
EOF</userinput></screen>
<para>See the <filename>systemd-coredump(8)</filename>,
<filename>coredumpctl(1)</filename>, and
<filename>coredump.conf.d(5)</filename> manual pages for more
information.</para>
<para>See the <ulink role='man' url='&man;systemd-coredump.8'>systemd-coredump(8)</ulink>,
<ulink role='man' url='&man;coredumpctl.1'>coredumpctl(1)</ulink>, and
<ulink role='man'
url='&man;coredump.conf.d.5'>coredump.conf.d(5)</ulink> manual pages for
more information.</para>
</sect2>
<sect2>

View File

@ -225,8 +225,9 @@
<para>Note that the <quote>softdep</quote> command also allows
<literal>pre:</literal> dependencies, or a mixture of both
<literal>pre:</literal> and <literal>post:</literal> dependencies. See
the <filename>modprobe.d(5)</filename> manual page for more information
on <quote>softdep</quote> syntax and capabilities.</para>
the <ulink role='man' url='&man;modprobe.d.5'>modprobe.d(5)</ulink>
manual page for more information on <quote>softdep</quote> syntax and
capabilities.</para>
<para revision="sysv">If the module in question is not a wrapper and is
useful by itself, configure the <command>modules</command> bootscript to

View File

@ -32,7 +32,8 @@
<para>SysVinit (which will be referred to as <quote>init</quote> from now on)
uses a run levels scheme. There are seven run levels, numbered 0 to 6.
(Actually, there are more run levels, but the others are for special cases and are
generally not used. See <filename>init(8)</filename> for more details.)
generally not used. See <ulink role='man'
url='&man;init.8'>init(8)</ulink> for more details.)
Each one of the seven corresponds to actions the computer is supposed to
perform when it starts up or shuts down. The default run level is 3. Here are the
descriptions of the different run levels as they are implemented in LFS:</para>
@ -341,9 +342,10 @@ EOF</userinput></screen>
url="https://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. If still in
doubt, look in the <filename class="directory">/usr/share/keymaps</filename>
and <filename class="directory">/usr/share/consolefonts</filename> directories
for valid keymaps and screen fonts. Read the <filename>loadkeys(1)</filename> and
<filename>setfont(8)</filename> manual pages to determine the correct
arguments for these programs.</para>
for valid keymaps and screen fonts. Read the <ulink role='man'
url='&man;loadkeys.1'>loadkeys(1)</ulink> and <ulink role='man'
url='&man;setfont.8'>setfont(8)</ulink> manual pages to determine the
correct arguments for these programs.</para>
<para>The <filename>/etc/sysconfig/console</filename> file should contain lines
of the form: VARIABLE="value". The following variables are recognized:</para>

View File

@ -56,7 +56,7 @@ EOF</userinput></screen>
class="partition">sda2</filename>, <filename
class="partition">sda5</filename>, and <systemitem
class="filesystem">ext4</systemitem>. For details on the six
fields in this file, see <filename>fstab(5)</filename>.</para>
fields in this file, see <ulink role='man' url='&man;fstab.5'>fstab(5)</ulink>.</para>
<para>Filesystems with MS-DOS or Windows origin (i.e. vfat, ntfs, smbfs,
cifs, iso9660, udf) need a special option, utf8, in order for non-ASCII

View File

@ -324,7 +324,8 @@
located in <xref linkend="ch-config-udev"/> and in the kernel
documentation in the <filename
class="directory">linux-&linux-version;/Documentation</filename> directory.
Also, <filename>modprobe.d(5)</filename> may be of interest.</para>
Also, <ulink role='man' url='&man;modprobe.d.5'>modprobe.d(5)</ulink>
may be of interest.</para>
<para>Unless module support has been disabled in the kernel configuration,
install the modules with:</para>

View File

@ -125,6 +125,7 @@
<!ENTITY github "https://github.com">
<!ENTITY pypi-home "https://pypi.org/project">
<!ENTITY pypi-src "https://pypi.org/packages/source">
<!ENTITY man "https://man.archlinux.org/man/">
<!ENTITY root "<systemitem class='username'>root</systemitem>">
<!ENTITY lfs-user "<systemitem class='username'>lfs</systemitem>">

View File

@ -74,14 +74,15 @@ EOF</userinput></screen>
<para>This format is used to encapsulate text that is optional.</para>
<para><filename>passwd(5)</filename></para>
<para><ulink role='man' url='&man;passwd.5'>passwd(5)</ulink></para>
<para>This format is used to refer to a specific manual (man) page. The number inside parentheses
indicates a specific section inside the manuals. For example,
<command>passwd</command> has two man pages. Per LFS installation instructions,
those two man pages will be located at
<filename>/usr/share/man/man1/passwd.1</filename> and
<filename>/usr/share/man/man5/passwd.5</filename>. When the book uses <filename>passwd(5)</filename> it is
<filename>/usr/share/man/man5/passwd.5</filename>. When the book uses
<ulink role='man' url='&man;/passwd.5'>passwd(5)</ulink> it is
specifically referring to <filename>/usr/share/man/man5/passwd.5</filename>.
<command>man passwd</command> will print the first man page it finds that
matches <quote>passwd</quote>, which will be
@ -89,7 +90,11 @@ EOF</userinput></screen>
need to run <command>man 5 passwd</command> in order to read the page
being specified. Note that most man pages do not have duplicate
page names in different sections. Therefore, <command>man <replaceable>&lt;program
name&gt;</replaceable></command> is generally sufficient.</para>
name&gt;</replaceable></command> is generally sufficient. In the LFS
book these references to man pages are also hyperlinks, so clicking on
such a reference will open the man page rendered in HTML from
<ulink url='https://man.archlinux.org/'>Arch Linux manual
pages</ulink>.</para>
</sect1>