Author: pierre
Date: Sat Mar 9 00:11:37 2019
New Revision: 4079
Log:
Generate console files:
- add variables LOCAL (y is hw clock set to local time) and LOG_LEVEL (sysv)
- generate /etc/sysconfig/console (sysv) or /etc/vconsole.conf (systemd)
- generate /etc/adjtime (only systemd)
- remove UNICODE and FONTMAP variables (jhalfs makes unicode default)
Modified:
jhalfs/trunk/Config.in
jhalfs/trunk/LFS/lfs.xsl
jhalfs/trunk/common/libs/func_book_parser
jhalfs/trunk/common/libs/func_validate_configs.sh
jhalfs/trunk/jhalfs
Modified: jhalfs/trunk/Config.in
==============================================================================
--- jhalfs/trunk/Config.in Sat Mar 9 00:02:10 2019 (r4078)
+++ jhalfs/trunk/Config.in Sat Mar 9 00:11:37 2019 (r4079)
@@ -1050,15 +1050,27 @@
config FONT
string "Console font"
default "lat0-16"
- config FONTMAP
- string "Font map (-m option to setfont)"
- default "8859-1"
- config UNICODE
- bool "Unicode mode"
- default y
+ help
+ Unicode mode is set by default. Setting FONT_MAP, FONT_UNIMAP,
+ etc, must be done manually.
config KEYMAP
string "Keymap name"
default "us"
+ config LOCAL
+ boolean "Hardware clock is set to local time"
+ default n
+ help
+ If the harware clock is set to local time, answer yes,
+ If it is set to UTC, answer no
+ config LOG_LEVEL
+ string "Default log level (1-8)"
+ default "4"
+ depends BOOK_LFS
+ help
+ This can be changed using dmesg. 1 means "no message",
+ 8 shows every message sent by the kernel, which is very
+ noisy. The default at boot time is 7, which is quite
+ noisy too.
endmenu # Console configuration
endmenu #--- System configuration
Modified: jhalfs/trunk/LFS/lfs.xsl
==============================================================================
--- jhalfs/trunk/LFS/lfs.xsl Sat Mar 9 00:02:10 2019 (r4078)
+++ jhalfs/trunk/LFS/lfs.xsl Sat Mar 9 00:11:37 2019 (r4079)
@@ -76,6 +76,14 @@
<xsl:param name='nameserver1' select='"10.0.2.3"'/>
<xsl:param name='nameserver2' select='"8.8.8.8"'/>
+ <!-- Console parameters: font, fontmap, unicode (y/n), keymap, local (y:
+ hardware clock set to local time/n:hardware clock set to UTC)
+ and log-level -->
+ <xsl:param name='font' select="'lat0-16'"/>
+ <xsl:param name='keymap' select="'us'"/>
+ <xsl:param name='local' select="'n'"/>
+ <xsl:param name='log-level' select="'4'"/>
+
<!-- End parameters -->
<xsl:template match="/">
@@ -613,6 +621,27 @@
<xsl:with-param name="netstring" select="string()"/>
</xsl:call-template>
</xsl:when>
+ <xsl:when test="contains(string(),'0.0 0 0.0')">
+ <xsl:copy-of select="substring-before(string(),'LOCAL')"/>
+ <xsl:if test="$local='y'"><xsl:text>LOCAL</xsl:text></xsl:if>
+ <xsl:if test="$local='n'"><xsl:text>UTC</xsl:text></xsl:if>
+ </xsl:when>
+ <xsl:when test="contains(string(),'UTC=1')">
+ <xsl:copy-of select="substring-before(string(),'1')"/>
+ <xsl:if test="$local='y'"><xsl:text>0</xsl:text></xsl:if>
+ <xsl:if test="$local='n'"><xsl:text>1</xsl:text></xsl:if>
+ <xsl:copy-of select="substring-after(string(),'1')"/>
+ </xsl:when>
+ <xsl:when test="contains(string(),'bg_bds-')">
+ <xsl:call-template name="outputsysvconsole">
+ <xsl:with-param name="consolestring" select="string()"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains(string(),'de-latin1')">
+ <xsl:call-template name="outputsysdconsole">
+ <xsl:with-param name="consolestring" select="string()"/>
+ </xsl:call-template>
+ </xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
@@ -779,6 +808,87 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+
+ <xsl:template name="outputsysvconsole">
+ <!-- We suppose that book example has the following values:
+ - KEYMAP: bg_bds-utf8
+ - FONT: LatArCyrHeb-16
+ Change below if book changes -->
+ <xsl:param name="consolestring" select="''"/>
+ <xsl:choose>
+ <xsl:when test="contains($consolestring,'bg_bds-utf8')">
+ <xsl:call-template name="outputsysvconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-before($consolestring,'bg_bds-utf8')"/>
+ </xsl:call-template>
+ <xsl:value-of select="$keymap"/>
+ <xsl:call-template name="outputsysvconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-after($consolestring,'bg_bds-utf8')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains($consolestring,'LatArCyrHeb-16')">
+ <xsl:call-template name="outputsysvconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-before($consolestring,'LatArCyrHeb-16')"/>
+ </xsl:call-template>
+ <xsl:value-of select="$font"/>
+ <xsl:text>"
+LOG_LEVEL="</xsl:text>
+ <xsl:copy-of select="$log-level"/>
+ <xsl:call-template name="outputsysvconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-after($consolestring,'LatArCyrHeb-16')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$consolestring"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="outputsysdconsole">
+ <!-- We suppose that book example has the following values:
+ - KEYMAP: de-latin1
+ - FONT: Lat2-Terminus16
+ Change below if book changes -->
+ <xsl:param name="consolestring" select="''"/>
+ <xsl:choose>
+ <xsl:when test="contains($consolestring,'de-latin1')">
+ <xsl:call-template name="outputsysdconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-before($consolestring,'de-latin1')"/>
+ </xsl:call-template>
+ <xsl:value-of select="$keymap"/>
+ <xsl:call-template name="outputsysdconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-after($consolestring,'de-latin1')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="contains($consolestring,'Lat2-Terminus16')">
+ <xsl:call-template name="outputsysdconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-before($consolestring,'Lat2-Terminus16')"/>
+ </xsl:call-template>
+ <xsl:value-of select="$font"/>
+ <xsl:call-template name="outputsysdconsole">
+ <xsl:with-param
+ name="consolestring"
+ select="substring-after($consolestring,'Lat2-Terminus16')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$consolestring"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
<xsl:template name="outputpkgdest">
<xsl:param name="outputstring" select="foo"/>
Modified: jhalfs/trunk/common/libs/func_book_parser
==============================================================================
--- jhalfs/trunk/common/libs/func_book_parser Sat Mar 9 00:02:10 2019
(r4078)
+++ jhalfs/trunk/common/libs/func_book_parser Sat Mar 9 00:11:37 2019
(r4079)
@@ -187,6 +187,12 @@
--stringparam domain "$DOMAIN" \
--stringparam nameserver1 "$DNS1" \
--stringparam nameserver2 "$DNS2" \
+ --stringparam font "$FONT" \
+ --stringparam fontmap "$FONTMAP" \
+ --stringparam unicode "$UNICODE" \
+ --stringparam keymap "$KEYMAP" \
+ --stringparam local "$LOCAL" \
+ --stringparam log-level "$LOG_LEVEL" \
--output ./${PROGNAME}-commands/ \
$XSL \
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
Modified: jhalfs/trunk/common/libs/func_validate_configs.sh
==============================================================================
--- jhalfs/trunk/common/libs/func_validate_configs.sh Sat Mar 9 00:02:10
2019 (r4078)
+++ jhalfs/trunk/common/libs/func_validate_configs.sh Sat Mar 9 00:11:37
2019 (r4079)
@@ -48,7 +48,7 @@
local -r CLFS3_build=" $BUILD_common"
# System Settings by book (only LFS for now)
- local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST
DOMAIN DNS1 DNS2 FONT CONSOLE_MAP UNICODE KEYMAP"
+ local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST
DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL"
# Full list of books settings
local -r lfs_PARAM_LIST="$LFS_book $GENERAL_common $LFS_build
$LFS_system $ADVANCED_chroot REALSBU $ADVANCED_common"
Modified: jhalfs/trunk/jhalfs
==============================================================================
--- jhalfs/trunk/jhalfs Sat Mar 9 00:02:10 2019 (r4078)
+++ jhalfs/trunk/jhalfs Sat Mar 9 00:11:37 2019 (r4079)
@@ -146,6 +146,7 @@
SET_MISC=${SET_MISC:=n}
SET_BLOWFISH=${SET_BLOWFISH:=n}
UNICODE=${UNICODE:=n}
+LOCAL=${LOCAL:=n}
REALSBU=${REALSBU:=n}
if [[ "${NO_PROGRESS_BAR}" = "y" ]] ; then
--
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page