From 3b43e17bdabeac5ece1c5ae22774c3d853df3e2f Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 9 Mar 2019 08:11:37 +0000 Subject: [PATCH] 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) --- Config.in | 24 ++++-- LFS/lfs.xsl | 110 +++++++++++++++++++++++++++ common/libs/func_book_parser | 6 ++ common/libs/func_validate_configs.sh | 2 +- jhalfs | 1 + 5 files changed, 136 insertions(+), 7 deletions(-) diff --git a/Config.in b/Config.in index ea7f3a5..20a7c87 100644 --- a/Config.in +++ b/Config.in @@ -1050,15 +1050,27 @@ menu "System configuration" 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 diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index 12b23b3..f50d5ab 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -76,6 +76,14 @@ + + + + + + @@ -613,6 +621,27 @@ unset OLD_PKGDIR + + + LOCAL + UTC + + + + 0 + 1 + + + + + + + + + + + + @@ -780,6 +809,87 @@ DNS= + + + + + + + + + + + + + + + + + + + " +LOG_LEVEL=" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser index 9c9493d..f3a3289 100644 --- a/common/libs/func_book_parser +++ b/common/libs/func_book_parser @@ -187,6 +187,12 @@ extract_commands() { # --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 diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh index 7f0304f..b05ad8b 100644 --- a/common/libs/func_validate_configs.sh +++ b/common/libs/func_validate_configs.sh @@ -48,7 +48,7 @@ inline_doc 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" diff --git a/jhalfs b/jhalfs index 80588ad..aa8c5f7 100755 --- a/jhalfs +++ b/jhalfs @@ -146,6 +146,7 @@ SET_WARNINGS=${SET_WARNINGS:=n} 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