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 <filename class="devicefile">/dev/sda</filename> for the primary
disk drive. Create a Linux native partition and a disk drive. Create a Linux native partition and a
<systemitem class="filesystem">swap</systemitem> partition, if needed. Please <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> you do not yet know how to use the programs.</para>
<note><para>For experienced users, other partitioning schemes are possible. <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 <para>The <quote><parameter>-</parameter></quote> instructs
<command>su</command> to start a login shell as opposed to a non-login shell. <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 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> </sect1>

View File

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

View File

@ -59,8 +59,9 @@ esac</userinput></screen>
<para> <para>
The above command is correct. The <command>ln</command> command has The above command is correct. The <command>ln</command> command has
several syntactic versions, so be sure to check several syntactic versions, so be sure to check
<command>info coreutils ln</command> and <filename>ln(1)</filename> <command>info coreutils ln</command> and <ulink role='man'
before reporting what may appear to be an error. url='&man;ln.1'>ln(1)</ulink> before reporting what may appear to be
an error.
</para> </para>
</note> </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> <screen role='nodump'><userinput>sed 's/metadata_csum_seed,//' -i /etc/mke2fs.conf</userinput></screen>
<para> <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> </para>
</sect2> </sect2>

View File

@ -163,7 +163,7 @@ make MANSUFFIX=ssl install</userinput></screen>
is a command-line tool for using the various cryptography functions is a command-line tool for using the various cryptography functions
of <application>OpenSSL</application>'s crypto library from the of <application>OpenSSL</application>'s crypto library from the
shell. It can be used for various functions which are documented in 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> </para>
<indexterm zone="ch-system-openssl openssl-prog"> <indexterm zone="ch-system-openssl openssl-prog">
<primary sortas="b-openssl">openssl</primary> <primary sortas="b-openssl">openssl</primary>
@ -195,7 +195,8 @@ make MANSUFFIX=ssl install</userinput></screen>
<para> <para>
implements the Transport Layer Security (TLS v1) protocol. implements the Transport Layer Security (TLS v1) protocol.
It provides a rich API, documentation 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> </para>
<indexterm zone="ch-system-openssl libssl"> <indexterm zone="ch-system-openssl libssl">
<primary sortas="c-libssl">libssl.so</primary> <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> to pass either the <parameter>-g</parameter> or <parameter>-N</parameter>
parameter to <command>useradd</command>, or else change the setting of parameter to <command>useradd</command>, or else change the setting of
<parameter>USERGROUPS_ENAB</parameter> in <parameter>USERGROUPS_ENAB</parameter> in
<filename>/etc/login.defs</filename>. See <filename>useradd(8)</filename> <filename>/etc/login.defs</filename>. See <ulink role='man'
for more information.</para> url='&man;useradd.8'>useradd(8)</ulink> for more information.</para>
<para>Second, to change the default parameters, the file <para>Second, to change the default parameters, the file
<filename>/etc/default/useradd</filename> must be created and tailored <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> <term><command>irqtop</command></term>
<listitem> <listitem>
<para>Displays kernel interrupt counter information in <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"> <indexterm zone="ch-system-util-linux irqtop">
<primary sortas="b-irqtop">irqtop</primary> <primary sortas="b-irqtop">irqtop</primary>
</indexterm> </indexterm>

View File

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

View File

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

View File

@ -225,8 +225,9 @@
<para>Note that the <quote>softdep</quote> command also allows <para>Note that the <quote>softdep</quote> command also allows
<literal>pre:</literal> dependencies, or a mixture of both <literal>pre:</literal> dependencies, or a mixture of both
<literal>pre:</literal> and <literal>post:</literal> dependencies. See <literal>pre:</literal> and <literal>post:</literal> dependencies. See
the <filename>modprobe.d(5)</filename> manual page for more information the <ulink role='man' url='&man;modprobe.d.5'>modprobe.d(5)</ulink>
on <quote>softdep</quote> syntax and capabilities.</para> 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 <para revision="sysv">If the module in question is not a wrapper and is
useful by itself, configure the <command>modules</command> bootscript to 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) <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. 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 (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 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 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> 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 url="https://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. If still in
doubt, look in the <filename class="directory">/usr/share/keymaps</filename> doubt, look in the <filename class="directory">/usr/share/keymaps</filename>
and <filename class="directory">/usr/share/consolefonts</filename> directories and <filename class="directory">/usr/share/consolefonts</filename> directories
for valid keymaps and screen fonts. Read the <filename>loadkeys(1)</filename> and for valid keymaps and screen fonts. Read the <ulink role='man'
<filename>setfont(8)</filename> manual pages to determine the correct url='&man;loadkeys.1'>loadkeys(1)</ulink> and <ulink role='man'
arguments for these programs.</para> 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 <para>The <filename>/etc/sysconfig/console</filename> file should contain lines
of the form: VARIABLE="value". The following variables are recognized:</para> 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">sda2</filename>, <filename
class="partition">sda5</filename>, and <systemitem class="partition">sda5</filename>, and <systemitem
class="filesystem">ext4</systemitem>. For details on the six 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, <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 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 located in <xref linkend="ch-config-udev"/> and in the kernel
documentation in the <filename documentation in the <filename
class="directory">linux-&linux-version;/Documentation</filename> directory. 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, <para>Unless module support has been disabled in the kernel configuration,
install the modules with:</para> install the modules with:</para>

View File

@ -125,6 +125,7 @@
<!ENTITY github "https://github.com"> <!ENTITY github "https://github.com">
<!ENTITY pypi-home "https://pypi.org/project"> <!ENTITY pypi-home "https://pypi.org/project">
<!ENTITY pypi-src "https://pypi.org/packages/source"> <!ENTITY pypi-src "https://pypi.org/packages/source">
<!ENTITY man "https://man.archlinux.org/man/">
<!ENTITY root "<systemitem class='username'>root</systemitem>"> <!ENTITY root "<systemitem class='username'>root</systemitem>">
<!ENTITY lfs-user "<systemitem class='username'>lfs</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>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 <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, indicates a specific section inside the manuals. For example,
<command>passwd</command> has two man pages. Per LFS installation instructions, <command>passwd</command> has two man pages. Per LFS installation instructions,
those two man pages will be located at those two man pages will be located at
<filename>/usr/share/man/man1/passwd.1</filename> and <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>. specifically referring to <filename>/usr/share/man/man5/passwd.5</filename>.
<command>man passwd</command> will print the first man page it finds that <command>man passwd</command> will print the first man page it finds that
matches <quote>passwd</quote>, which will be 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 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 being specified. Note that most man pages do not have duplicate
page names in different sections. Therefore, <command>man <replaceable>&lt;program 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> </sect1>