aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/sysd-custom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter07/sysd-custom.xml')
-rw-r--r--chapter07/sysd-custom.xml139
1 files changed, 138 insertions, 1 deletions
diff --git a/chapter07/sysd-custom.xml b/chapter07/sysd-custom.xml
index 7f3d4864b..e5872ece9 100644
--- a/chapter07/sysd-custom.xml
+++ b/chapter07/sysd-custom.xml
@@ -8,7 +8,7 @@
<sect1 id="ch-scripts-sysd-custom">
<?dbhtml filename="sysd-custom.html"?>
- <title>Systemd Customization</title>
+ <title>Systemd Usage and Confiuration</title>
<indexterm zone="ch-scripts-sysd-custom">
<primary sortas="e-Systemd">Systemd Customization</primary>
@@ -98,6 +98,143 @@ EOF</userinput></screen>
</sect2>
+ <sect2 id="ch-scripts-systemd-console">
+ <title>Setting Console Fonts and Keyboard</title>
+
+ <indexterm zone="ch-scripts-systemd-console">
+ <primary sortas="d-console">systemd console</primary>
+ <secondary>configuring</secondary>
+ </indexterm>
+
+ <para>This section discusses how to configure the
+ <command>systemd-vconsole-setup</command> system service, which configures
+ the virtual console font and console keymap.</para>
+
+ <para>The <command>systemd-vconsole-setup</command> service reads the
+ <filename>/etc/vconsole.conf</filename> file for configuration
+ information. Decide which keymap and screen font will be used. Various
+ language-specific HOWTOs can also help with this, see <ulink
+ url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>.
+ Examine <command>localectl list-keymaps</command> output for a list of
+ valid console keymaps. Look in
+ <filename class="directory">/usr/share/consolefonts</filename>
+ directory for valid screen fonts.</para>
+
+ <para>The <filename>/etc/vconsole.conf</filename> file should contain lines
+ of the form: VARIABLE="value". The following variables are recognized:</para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term>KEYMAP</term>
+ <listitem>
+ <para>This variable specifies the key mapping table for the keyboard. If
+ unset, it defaults to <literal>us</literal>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>KEYMAP_TOGGLE</term>
+ <listitem>
+ <para>This variable can be used to configure a second toggle keymap and
+ is unset by default.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>FONT</term>
+ <listitem>
+ <para>This variable specifies the font used by the virtual
+ console.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>FONT_MAP</term>
+ <listitem>
+ <para>This variable specifies the console map to be used.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>FONT_UNIMAP</term>
+ <listitem>
+ <para>This variable specifies the unicode font map.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ <para>An example for a German keyboard and console is given below:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/vconsole.conf &lt;&lt; "EOF"
+<literal>KEYMAP=de-latin1
+FONT=Lat2-Terminus16</literal>
+EOF</userinput></screen>
+
+ <para>You can change KEYMAP value at runtime by using the
+ <command>localectl</command> utility:</para>
+
+<screen role="nodump"><userinput>localectl set-keymap MAP</userinput></screen>
+
+ <note><para>Please note that <command>localectl</command> command can
+ be used only on a system booted with Systemd.</para></note>
+
+ </sect2>
+
+ <sect2>
+ <title>Clock Configuration</title>
+
+ <indexterm zone="ch-scripts-clock">
+ <primary sortas="d-clock">clock</primary>
+ <secondary>configuring</secondary></indexterm>
+
+ <para>This section discusses how to configure the
+ <command>systemd-timedated</command> system service, which configures
+ system clock and timezone.</para>
+
+ <para><command>systemd-timedated</command> reads
+ <filename>/etc/adjtime</filename>, and depending on the contents of the file,
+ it sets the clock to either UTC or local time. Create the
+ <filename>/etc/adjtime</filename> file with the following contents <emphasis>if your
+ hardware clock is set to local time</emphasis>:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/adjtime &lt;&lt; "EOF"
+<literal>0.0 0 0.0
+0
+LOCAL</literal>
+EOF</userinput></screen>
+
+ <para>If <filename>/etc/adjtime</filename> isn't present at first boot,
+ <command>systemd-timedated</command> will assume that hardware clock is
+ set to UTC and create the file using that setting.</para>
+
+ <para>You can also use the <command>timedatectl</command> utility to tell
+ <command>systemd-timedated</command> if your hardware clock is set to
+ UTC or local time:</para>
+
+<screen role="nodump"><userinput>timedatectl set-local-rtc 1</userinput></screen>
+
+ <para><command>timedatectl</command> can also be used to change system time and
+ time zone.</para>
+
+ <para>To change your current system time, issue:</para>
+
+<screen role="nodump"><userinput>timedatectl set-time YYYY:MM:DD HH:MM:SS</userinput></screen>
+
+ <para>Hardware clock will also be updated accordingly.</para>
+
+ <para>To change your current time zone, issue:</para>
+
+<screen role="nodump"><userinput>timedatectl set-timezone TIMEZONE</userinput></screen>
+
+ <para>You can get list of available time zones by running:</para>
+
+<screen role="nodump"><userinput>timedatectl list-timezones</userinput></screen>
+
+ <note><para>The <command>timedatectl</command> command can
+ be used only on a system booted with Systemd.</para></note>
+
+ </sect2>
+
<sect2>
<title>Debugging the Boot Sequence</title>