Changeset 3b43e17b


Ignore:
Timestamp:
03/09/2019 08:11:37 AM (5 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
426c618
Parents:
90f5b6d
Message:

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)
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Config.in

    r90f5b6d r3b43e17b  
    10511051            string "Console font"
    10521052            default "lat0-16"
    1053         config FONTMAP
    1054             string "Font map (-m option to setfont)"
    1055             default "8859-1"
    1056         config UNICODE
    1057             bool "Unicode mode"
    1058             default y
     1053            help
     1054                Unicode mode is set by default. Setting FONT_MAP, FONT_UNIMAP,
     1055                etc, must be done manually.
    10591056        config KEYMAP
    10601057            string "Keymap name"
    10611058            default "us"
     1059        config LOCAL
     1060            boolean "Hardware clock is set to local time"
     1061            default n
     1062            help
     1063                If the harware clock is set to local time, answer yes,
     1064                If it is set to UTC, answer no
     1065        config LOG_LEVEL
     1066            string "Default log level (1-8)"
     1067            default "4"
     1068            depends BOOK_LFS
     1069            help
     1070                This can be changed using dmesg. 1 means "no message",
     1071                8 shows every message sent by the kernel, which is very
     1072                noisy. The default at boot time is 7, which is quite
     1073                noisy too.
    10621074    endmenu # Console configuration
    10631075
  • LFS/lfs.xsl

    r90f5b6d r3b43e17b  
    7676  <xsl:param name='nameserver1' select='"10.0.2.3"'/>
    7777  <xsl:param name='nameserver2' select='"8.8.8.8"'/>
     78
     79  <!-- Console parameters: font, fontmap, unicode (y/n), keymap, local (y:
     80       hardware clock set to local time/n:hardware clock set to UTC)
     81       and log-level -->
     82  <xsl:param name='font'      select="'lat0-16'"/>
     83  <xsl:param name='keymap'    select="'us'"/>
     84  <xsl:param name='local'     select="'n'"/>
     85  <xsl:param name='log-level' select="'4'"/>
    7886
    7987<!-- End parameters -->
     
    614622        </xsl:call-template>
    615623      </xsl:when>
     624      <xsl:when test="contains(string(),'0.0 0 0.0')">
     625        <xsl:copy-of select="substring-before(string(),'LOCAL')"/>
     626        <xsl:if test="$local='y'"><xsl:text>LOCAL</xsl:text></xsl:if>
     627        <xsl:if test="$local='n'"><xsl:text>UTC</xsl:text></xsl:if>
     628      </xsl:when>
     629      <xsl:when test="contains(string(),'UTC=1')">
     630        <xsl:copy-of select="substring-before(string(),'1')"/>
     631        <xsl:if test="$local='y'"><xsl:text>0</xsl:text></xsl:if>
     632        <xsl:if test="$local='n'"><xsl:text>1</xsl:text></xsl:if>
     633        <xsl:copy-of select="substring-after(string(),'1')"/>
     634      </xsl:when>
     635      <xsl:when test="contains(string(),'bg_bds-')">
     636        <xsl:call-template name="outputsysvconsole">
     637          <xsl:with-param name="consolestring" select="string()"/>
     638        </xsl:call-template>
     639      </xsl:when>
     640      <xsl:when test="contains(string(),'de-latin1')">
     641        <xsl:call-template name="outputsysdconsole">
     642          <xsl:with-param name="consolestring" select="string()"/>
     643        </xsl:call-template>
     644      </xsl:when>
    616645      <xsl:otherwise>
    617646        <xsl:apply-templates/>
     
    777806      <xsl:otherwise>
    778807        <xsl:value-of select="$netstring"/>
     808      </xsl:otherwise>
     809    </xsl:choose>
     810  </xsl:template>
     811
     812  <xsl:template name="outputsysvconsole">
     813    <!-- We suppose that book example has the following values:
     814         - KEYMAP: bg_bds-utf8
     815         - FONT: LatArCyrHeb-16
     816         Change below if book changes -->
     817    <xsl:param name="consolestring" select="''"/>
     818    <xsl:choose>
     819      <xsl:when test="contains($consolestring,'bg_bds-utf8')">
     820        <xsl:call-template name="outputsysvconsole">
     821          <xsl:with-param
     822                 name="consolestring"
     823                 select="substring-before($consolestring,'bg_bds-utf8')"/>
     824        </xsl:call-template>
     825        <xsl:value-of select="$keymap"/>
     826        <xsl:call-template name="outputsysvconsole">
     827          <xsl:with-param
     828                 name="consolestring"
     829                 select="substring-after($consolestring,'bg_bds-utf8')"/>
     830        </xsl:call-template>
     831      </xsl:when>
     832      <xsl:when test="contains($consolestring,'LatArCyrHeb-16')">
     833        <xsl:call-template name="outputsysvconsole">
     834          <xsl:with-param
     835                 name="consolestring"
     836                 select="substring-before($consolestring,'LatArCyrHeb-16')"/>
     837        </xsl:call-template>
     838        <xsl:value-of select="$font"/>
     839        <xsl:text>"
     840LOG_LEVEL="</xsl:text>
     841        <xsl:copy-of select="$log-level"/>
     842        <xsl:call-template name="outputsysvconsole">
     843          <xsl:with-param
     844                 name="consolestring"
     845                 select="substring-after($consolestring,'LatArCyrHeb-16')"/>
     846        </xsl:call-template>
     847      </xsl:when>
     848      <xsl:otherwise>
     849        <xsl:copy-of select="$consolestring"/>
     850      </xsl:otherwise>
     851    </xsl:choose>
     852  </xsl:template>
     853
     854  <xsl:template name="outputsysdconsole">
     855    <!-- We suppose that book example has the following values:
     856         - KEYMAP: de-latin1
     857         - FONT: Lat2-Terminus16
     858         Change below if book changes -->
     859    <xsl:param name="consolestring" select="''"/>
     860    <xsl:choose>
     861      <xsl:when test="contains($consolestring,'de-latin1')">
     862        <xsl:call-template name="outputsysdconsole">
     863          <xsl:with-param
     864                 name="consolestring"
     865                 select="substring-before($consolestring,'de-latin1')"/>
     866        </xsl:call-template>
     867        <xsl:value-of select="$keymap"/>
     868        <xsl:call-template name="outputsysdconsole">
     869          <xsl:with-param
     870                 name="consolestring"
     871                 select="substring-after($consolestring,'de-latin1')"/>
     872        </xsl:call-template>
     873      </xsl:when>
     874      <xsl:when test="contains($consolestring,'Lat2-Terminus16')">
     875        <xsl:call-template name="outputsysdconsole">
     876          <xsl:with-param
     877                 name="consolestring"
     878                 select="substring-before($consolestring,'Lat2-Terminus16')"/>
     879        </xsl:call-template>
     880        <xsl:value-of select="$font"/>
     881        <xsl:call-template name="outputsysdconsole">
     882          <xsl:with-param
     883                 name="consolestring"
     884                 select="substring-after($consolestring,'Lat2-Terminus16')"/>
     885        </xsl:call-template>
     886      </xsl:when>
     887      <xsl:otherwise>
     888        <xsl:copy-of select="$consolestring"/>
    779889      </xsl:otherwise>
    780890    </xsl:choose>
  • common/libs/func_book_parser

    r90f5b6d r3b43e17b  
    188188                 --stringparam nameserver1    "$DNS1"         \
    189189                 --stringparam nameserver2    "$DNS2"         \
     190                 --stringparam font           "$FONT"         \
     191                 --stringparam fontmap        "$FONTMAP"      \
     192                 --stringparam unicode        "$UNICODE"      \
     193                 --stringparam keymap         "$KEYMAP"       \
     194                 --stringparam local          "$LOCAL"        \
     195                 --stringparam log-level      "$LOG_LEVEL"    \
    190196                 --output ./${PROGNAME}-commands/             \
    191197                 $XSL                                         \
  • common/libs/func_validate_configs.sh

    r90f5b6d r3b43e17b  
    4949
    5050  # System Settings by book (only LFS for now)
    51   local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT CONSOLE_MAP UNICODE KEYMAP"
     51  local -r LFS_system="HOSTNAME INTERFACE IP_ADDR GATEWAY PREFIX BROADCAST DOMAIN DNS1 DNS2 FONT KEYMAP LOCAL LOG_LEVEL"
    5252
    5353  # Full list of books settings
  • jhalfs

    r90f5b6d r3b43e17b  
    147147SET_BLOWFISH=${SET_BLOWFISH:=n}
    148148UNICODE=${UNICODE:=n}
     149LOCAL=${LOCAL:=n}
    149150REALSBU=${REALSBU:=n}
    150151
Note: See TracChangeset for help on using the changeset viewer.