diff --git a/etc/archboot/aarch64-update_installer.conf b/etc/archboot/aarch64-update_installer.conf index a9ed0c10d..648d57669 100644 --- a/etc/archboot/aarch64-update_installer.conf +++ b/etc/archboot/aarch64-update_installer.conf @@ -11,7 +11,7 @@ archboot_base_common_cleanup archboot_base archboot_base_cleanup archboot_filesy archboot_filesystems_cleanup archboot_net archboot_net_cleanup archboot_acpi \ archboot_cpufreq archboot_devicemapper archboot_hypervisor archboot_net_common \ archboot_platform archboot_wireless archboot_installer_common archboot_installer \ -archboot_installer_cleanup archboot_clock archboot_keymap archboot_motd archboot_mdadm \ +archboot_installer_cleanup archboot_clock archboot_vconsole archboot_motd archboot_mdadm \ archboot_lvm2 archboot_remote archboot_kexec archboot_efibootmgr archboot_pciutils \ archboot_usbutils archboot_smartmontools archboot_licenses archboot_neovim \ archboot_secure_boot archboot_efivar archboot_lshw) diff --git a/etc/archboot/aarch64.conf b/etc/archboot/aarch64.conf index 85b372826..f81e9b338 100644 --- a/etc/archboot/aarch64.conf +++ b/etc/archboot/aarch64.conf @@ -7,7 +7,7 @@ HOOKS=(archboot_firmware archboot_common_modules archboot_kms archboot_block_modules \ archboot_base_common archboot_base archboot_installer_common archboot_installer \ -archboot_clock archboot_keymap archboot_acpi archboot_motd archboot_net_common \ +archboot_clock archboot_vconsole archboot_acpi archboot_motd archboot_net_common \ archboot_net archboot_devicemapper archboot_mdadm archboot_lvm2 \ archboot_filesystems archboot_remote archboot_cpufreq archboot_kexec \ archboot_efibootmgr archboot_pciutils archboot_usbutils archboot_smartmontools \ diff --git a/etc/archboot/riscv64.conf b/etc/archboot/riscv64.conf index cbb05be58..c60181f12 100644 --- a/etc/archboot/riscv64.conf +++ b/etc/archboot/riscv64.conf @@ -7,7 +7,7 @@ HOOKS=(archboot_firmware archboot_common_modules archboot_kms archboot_block_modules \ archboot_base_common archboot_base archboot_installer_common archboot_installer \ -archboot_clock archboot_keymap archboot_acpi archboot_motd archboot_net_common \ +archboot_clock archboot_vconsole archboot_acpi archboot_motd archboot_net_common \ archboot_net archboot_devicemapper archboot_mdadm archboot_lvm2 \ archboot_filesystems archboot_remote archboot_kexec archboot_efibootmgr \ archboot_pciutils archboot_usbutils archboot_smartmontools archboot_licenses \ diff --git a/etc/archboot/x86_64-update_installer.conf b/etc/archboot/x86_64-update_installer.conf index 435ebd1e7..98e00d7d1 100644 --- a/etc/archboot/x86_64-update_installer.conf +++ b/etc/archboot/x86_64-update_installer.conf @@ -11,7 +11,7 @@ archboot_base_common_cleanup archboot_base archboot_base_cleanup archboot_filesy archboot_filesystems_cleanup archboot_net archboot_net_cleanup archboot_acpi \ archboot_cpufreq archboot_devicemapper archboot_hypervisor archboot_net_common \ archboot_dmidecode archboot_platform archboot_wireless archboot_installer_common \ -archboot_installer archboot_installer_cleanup archboot_clock archboot_keymap \ +archboot_installer archboot_installer_cleanup archboot_clock archboot_vconsole \ archboot_motd archboot_mdadm archboot_lvm2 archboot_remote archboot_kexec \ archboot_efibootmgr archboot_pciutils archboot_usbutils archboot_smartmontools \ archboot_licenses archboot_neovim archboot_secure_boot archboot_efivar archboot_lshw) diff --git a/etc/archboot/x86_64.conf b/etc/archboot/x86_64.conf index 215b3a36f..b82cbae84 100644 --- a/etc/archboot/x86_64.conf +++ b/etc/archboot/x86_64.conf @@ -7,7 +7,7 @@ HOOKS=(archboot_firmware archboot_common_modules archboot_block_modules archboot_kms \ archboot_base_common archboot_base archboot_installer_common archboot_installer \ -archboot_clock archboot_keymap archboot_acpi archboot_motd archboot_net_common \ +archboot_clock archboot_vconsole archboot_acpi archboot_motd archboot_net_common \ archboot_net archboot_devicemapper archboot_mdadm archboot_lvm2 \ archboot_filesystems archboot_remote archboot_cpufreq archboot_kexec \ archboot_efibootmgr archboot_pciutils archboot_usbutils archboot_smartmontools \ diff --git a/usr/bin/archboot-locale.sh b/usr/bin/archboot-localize.sh similarity index 52% rename from usr/bin/archboot-locale.sh rename to usr/bin/archboot-localize.sh index bc56254da..24fc84292 100755 --- a/usr/bin/archboot-locale.sh +++ b/usr/bin/archboot-localize.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # SPDX-License-Identifier: GPL-2.0-only # written by Tobias Powalowski -_ANSWER="/tmp/.locale" +_ANSWER="/tmp/.localize" _RUNNING_ARCH="$(uname -m)" -_TITLE="Archboot ${_RUNNING_ARCH} | Arch Linux Setup | System Wide Locale Setting" +_TITLE="Archboot ${_RUNNING_ARCH} | Arch Linux Setup | Locale Configuration" # _dialog() # an el-cheapo dialog wrapper # @@ -16,50 +16,50 @@ _dialog() { _abort() { _dialog --yesno "Abort Arch Linux System Wide Locale Setting?" 5 60 || return 0 - [[ -e /tmp/.locale-running ]] && rm /tmp/.locale-running - [[ -e /tmp/.locale ]] && rm /tmp/.locale + [[ -e /tmp/.localize-running ]] && rm /tmp/.localize-running + [[ -e /tmp/.localize ]] && rm /tmp/.localize clear exit 1 } -_do_locale() { - _dialog --infobox "Setting System Wide Locale ${_LOCALE}.UTF-8..." 3 50 - echo "LANG=${_LOCALE}.UTF-8" > /etc/locale.conf - echo "LANG=${_LOCALE}.UTF-8" > /tmp/.locale - echo LC_COLLATE=C >> /etc/locale.conf - localectl set-locale "${_LOCALE}.UTF-8" &>/dev/null - sed -i -e "s:^[a-z]:#&:g" /etc/locale.gen - sed -i -e "s:^#${_LOCALE}.UTF-8:${_LOCALE}.UTF-8:g" /etc/locale.gen - locale-gen &>/dev/null - sleep 2 -} - -_set_locale() { +_localize_menu() { _LOCALE="" _LOCALES="en_US English de_DE German es_ES Spanish fr_FR French pt_PT Portuguese OTHER Other" _OTHER_LOCALES="be_BY Belarusian bg_BG Bulgarian cs_CZ Czech da_DK Dansk fi_FI Finnish el_GR Greek hu_HU Hungarian it_IT Italian lt_LT Lithuanian lv_LV Latvian mk_MK Macedonian nl_NL Dutch nn_NO Norwegian pl_PL Polish ro_RO Romanian ru_RU Russian sk_SK Slovak sr_RS Serbian sv_SE Swedish uk_UA Ukrainian" _CANCEL="" #shellcheck disable=SC2086 - _dialog --menu "Select A System Wide Locale:" 13 35 6 ${_LOCALES} 2>${_ANSWER} || _abort + _dialog --title " Locale Menu " --menu "" 12 35 5 ${_LOCALES} 2>${_ANSWER} || _abort _LOCALE=$(cat ${_ANSWER}) if [[ "${_LOCALE}" == "OTHER" ]]; then #shellcheck disable=SC2086 - _dialog --menu "Select A System Wide Locale:" 18 35 12 ${_OTHER_LOCALES} 2>${_ANSWER} || _abort + _dialog --title " Other Locale Menu " --menu "" 17 35 11 ${_OTHER_LOCALES} 2>${_ANSWER} || _abort _LOCALE=$(cat ${_ANSWER}) fi } -if [[ -e /tmp/.locale-running ]]; then - echo "System Wide Locale Setting already runs on a different console!" - echo "Please remove /tmp/.locale-running first!" +_localize() { + _dialog --infobox "Locale configuration set to ${_LOCALE}.UTF-8..." 3 50 + echo "LANG=${_LOCALE}.UTF-8" > /etc/localize.conf + echo "LANG=${_LOCALE}.UTF-8" > /tmp/.localize + echo LC_COLLATE=C >> /etc/localize.conf + localizectl set-localize "${_LOCALE}.UTF-8" &>/dev/null + sed -i -e "s:^[a-z]:#&:g" /etc/localize.gen + sed -i -e "s:^#${_LOCALE}.UTF-8:${_LOCALE}.UTF-8:g" /etc/localize.gen + localize-gen &>/dev/null + sleep 2 +} + +if [[ -e /tmp/.localize-running ]]; then + echo "Locale configuration already runs on a different console!" + echo "Please remove /tmp/.localize-running first!" exit 1 fi -: >/tmp/.locale-running +: >/tmp/.localize-running while [[ -z ${_LOCALE} ]]; do - _set_locale + _localize_menu done -_do_locale -[[ -e /tmp/.locale-running ]] && rm /tmp/.locale-running +_localize +[[ -e /tmp/.localize-running ]] && rm /tmp/.localize-running clear exit 0 # vim: set ts=4 sw=4 et: diff --git a/usr/bin/archboot-km.sh b/usr/bin/archboot-vconsole.sh similarity index 74% rename from usr/bin/archboot-km.sh rename to usr/bin/archboot-vconsole.sh index 004e27d7d..057bb1dbd 100755 --- a/usr/bin/archboot-km.sh +++ b/usr/bin/archboot-vconsole.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # SPDX-License-Identifier: GPL-2.0-only # written by Tobias Powalowski -_ANSWER="/tmp/.km" +_ANSWER="/tmp/.vconsole" _RUNNING_ARCH="$(uname -m)" -_TITLE="Archboot ${_RUNNING_ARCH} | Arch Linux Setup | Console Configuration" +_TITLE="Archboot ${_RUNNING_ARCH} | Arch Linux Setup | Vconsole Configuration" _LIST_MAPS="localectl list-keymaps --no-pager" # _dialog() # an el-cheapo dialog wrapper @@ -16,9 +16,9 @@ _dialog() { } _abort() { - if _dialog --yesno "Abort Arch Linux Console Configuration?" 5 50; then - [[ -e /tmp/.km-running ]] && rm /tmp/.km-running - [[ -e /tmp/.km ]] && rm /tmp/.km + if _dialog --yesno "Abort Arch Linux Vconsole Configuration?" 5 50; then + [[ -e /tmp/.vconsole-running ]] && rm /tmp/.vconsole-running + [[ -e /tmp/.vconsole ]] && rm /tmp/.vconsole clear exit 1 else @@ -27,12 +27,12 @@ _abort() { } _do_vconsole() { - _dialog --infobox "Setting console font ${_FONT} and keymap ${_KEYMAP}..." 3 80 + _dialog --infobox "Setting vconsole font ${_FONT} and keymap ${_KEYMAP}..." 3 80 echo KEYMAP="${_KEYMAP}" > /etc/vconsole.conf echo FONT="${_FONT}" >> /etc/vconsole.conf systemctl restart systemd-vconsole-setup sleep 2 - _dialog --infobox "Console Font and Keymap setting completed successfully.\nContinuing in 5 seconds..." 4 60 + _dialog --infobox "Vconsole configuration completed successfully.\nContinuing in 5 seconds..." 4 60 sleep 5 return 0 } @@ -46,7 +46,7 @@ _set_vconsole() { _FONTS="ter-v16n Worldwide latarcyrheb-sun16 Worldwide eurlatgr Europe" fi #shellcheck disable=SC2086 - if _dialog --menu " Select Console Font:\n\n Font Name Region" 12 40 14 ${_FONTS} 2>${_ANSWER}; then + if _dialog --menu " Select Vconsole Font:\n\n Font Name Region" 12 40 14 ${_FONTS} 2>${_ANSWER}; then #shellcheck disable=SC2086 _FONT=$(cat ${_ANSWER}) _CONTINUE=1 @@ -96,20 +96,20 @@ _set_vconsole() { done } -if [[ -e /tmp/.km-running ]]; then - echo "km already runs on a different console!" - echo "Please remove /tmp/.km-running first to launch tz!" +if [[ -e /tmp/.vconsole-running ]]; then + echo "vconsole already runs on a different vconsole!" + echo "Please remove /tmp/.vconsole-running first to launch vconsole!" exit 1 fi -: >/tmp/.km-running +: >/tmp/.vconsole-running if ! _set_vconsole; then - [[ -e /tmp/.km ]] && rm /tmp/.km - [[ -e /tmp/.km-running ]] && rm /tmp/.km-running + [[ -e /tmp/.vconsole ]] && rm /tmp/.vconsole + [[ -e /tmp/.vconsole-running ]] && rm /tmp/.vconsole-running clear exit 1 fi -[[ -e /tmp/.km ]] && rm /tmp/.km -[[ -e /tmp/.km-running ]] && rm /tmp/.km-running +[[ -e /tmp/.vconsole ]] && rm /tmp/.vconsole +[[ -e /tmp/.vconsole-running ]] && rm /tmp/.vconsole-running _do_vconsole clear exit 0 diff --git a/usr/lib/archboot/installer/base.sh b/usr/lib/archboot/installer/base.sh index 51c5bd800..3e90828fc 100644 --- a/usr/lib/archboot/installer/base.sh +++ b/usr/lib/archboot/installer/base.sh @@ -140,12 +140,12 @@ _set_guid() { } _configure_vconsole() { - if [[ -e /usr/bin/km ]]; then - km && _NEXTITEM=1 - elif [[ -e /usr/bin/archboot-km.sh ]]; then - archboot-km.sh && _NEXTITEM=1 + if [[ -e /usr/bin/vconsole ]]; then + vconsole && _NEXTITEM=1 + elif [[ -e /usr/bin/archboot-vconsole.sh ]]; then + archboot-vconsole.sh && _NEXTITEM=1 else - _dialog --msgbox "Error:\nkm script not found, aborting console and keyboard configuration." 0 0 + _dialog --msgbox "Error:\nvconsole script not found, aborting vconsole configuration." 0 0 fi } diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index 80a749b15..a8a627ed7 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -182,12 +182,12 @@ if [[ -e /usr/bin/setup ]]; then _enter_shell # basic environment setup: # glibc locale, vconsole, network, clock - if ! [[ -e /tmp/.locale ]]; then - archboot-locale.sh + if ! [[ -e /tmp/.localize ]]; then + localize source /etc/locale.conf fi if ! [[ -e /tmp/.keymap ]]; then - km && : >/tmp/.keymap + vconsole && : >/tmp/.vconsole fi if [[ ! -e /tmp/.network && ! -e "${_CACHEDIR}/archboot.db" ]]; then network && : >/tmp/.network diff --git a/usr/lib/archboot/update/update.sh b/usr/lib/archboot/update/update.sh index d54ae1e5e..98f8d94f1 100644 --- a/usr/lib/archboot/update/update.sh +++ b/usr/lib/archboot/update/update.sh @@ -34,7 +34,7 @@ usage () { echo -e "\e[1m-----------------------------------------\e[m" echo -e " \e[1m-help\e[m This message." if [[ ! -e "/var/cache/pacman/pkg/archboot.db" || -e "/usr/bin/setup" ]]; then - echo -e " \e[1m-update\e[m Update scripts: setup, quickinst, clock, km and helpers." + echo -e " \e[1m-update\e[m Update scripts: setup, quickinst, clock, vconsole and helpers." fi # latest image if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2000000 && ! -e "/.full_system" && ! -e "/var/cache/pacman/pkg/archboot.db" ]]; then @@ -93,7 +93,7 @@ _download_latest() { # Download latest setup and quickinst script from git repository if [[ -n "${_D_SCRIPTS}" ]]; then _network_check - echo -e "\e[1mStart:\e[m Downloading latest km, clock, quickinst, setup and helpers..." + echo -e "\e[1mStart:\e[m Downloading latest vconsole, clock, quickinst, setup and helpers..." [[ -d "${_INST}" ]] || mkdir "${_INST}" # config echo -e "\e[1mStep 1/4:\e[m Downloading latest config..." @@ -101,11 +101,11 @@ _download_latest() { # helper binaries echo -e "\e[1mStep 2/4:\e[m Downloading latest scripts..." # main binaries - BINS="quickinst setup km clock launcher network update copy-mountpoint rsync-backup restore-usbstick" + BINS="quickinst setup vconsole clock launcher localize network update copy-mountpoint rsync-backup restore-usbstick" for i in ${BINS}; do [[ -e "${_BIN}/${i}" ]] && wget -q "${_SOURCE}${_BIN}/archboot-${i}.sh?inline=false" -O "${_BIN}/${i}" done - BINS="binary-check.sh not-installed.sh secureboot-keys.sh mkkeys.sh hwsim.sh locale.sh cpio,sh" + BINS="binary-check.sh not-installed.sh secureboot-keys.sh mkkeys.sh hwsim.sh cpio,sh" for i in ${BINS}; do [[ -e "${_BIN}/${i}" ]] && wget -q "${_SOURCE}${_BIN}/archboot-${i}?inline=false" -O "${_BIN}/${i}" [[ -e "${_BIN}/archboot-${i}" ]] && wget -q "${_SOURCE}${_BIN}/archboot-${i}?inline=false" -O "${_BIN}/archboot-${i}" @@ -618,7 +618,7 @@ EOF _configure_plasma() { echo "Configuring KDE..." - sed -i -e "s#applications:.*#applications:systemsettings.desktop,applications:org.kde.konsole.desktop,preferred://filemanager,applications:${_STANDARD_BROWSER}.desktop,applications:gparted.desktop,applications:archboot.desktop#g" /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml + sed -i -e "s#applications:.*#applications:systemsettings.desktop,applications:org.kde.konsole.desktop,preferred://filemanager,applications:${_STANDARD_BROWSER}.desktop,applications:gparted.desktop,applications:archboot.desktop#g" /usr/share/plasma/plasmoids/org.kde.plasma.tasvconsoleanager/contents/config/main.xml echo "Replacing wallpaper..." for i in /usr/share/wallpapers/Next/contents/images/*; do cp /usr/share/archboot/grub/archboot-background.png "${i}" diff --git a/usr/lib/initcpio/install/archboot_installer b/usr/lib/initcpio/install/archboot_installer index 8ad2190ba..bd999bafb 100644 --- a/usr/lib/initcpio/install/archboot_installer +++ b/usr/lib/initcpio/install/archboot_installer @@ -5,10 +5,11 @@ build () { map add_binary genfstab arch-chroot pacstrap \ - archboot-binary-check.sh archboot-not-installed.sh archboot-locale.sh hwdetect + archboot-binary-check.sh archboot-not-installed.sh hwdetect add_file "/usr/bin/archboot-setup.sh" "/usr/bin/setup" add_file "/usr/bin/archboot-launcher.sh" "/usr/bin/launcher" add_file "/usr/bin/archboot-quickinst.sh" "/usr/bin/quickinst" + add_file "/usr/bin/archboot-localize.sh" "/usr/bin/localize" add_file "/usr/bin/archboot-copy-mountpoint.sh" "/usr/bin/copy-mountpoint.sh" add_file "/usr/bin/archboot-rsync-backup.sh" "/usr/bin/rsync-backup.sh" add_file "/usr/bin/archboot-restore-usbstick.sh" "/usr/bin/restore-usbstick.sh" diff --git a/usr/lib/initcpio/install/archboot_motd b/usr/lib/initcpio/install/archboot_motd index 5e9da94ef..ea48bd9f1 100644 --- a/usr/lib/initcpio/install/archboot_motd +++ b/usr/lib/initcpio/install/archboot_motd @@ -11,10 +11,10 @@ build () [[ "$(uname -m)" == "riscv64" ]] && echo -e "\e[1mWelcome to \e[36mArchboot\e[m\e[1m - Arch Linux RISCV64\e[m" >> "${MOTD}" #shellcheck disable=SC2129 echo -e "\e[1m----------------------------------------\e[m" >> "${MOTD}" - echo -e "\e[1mConsole Configuration:\e[m" >> "${MOTD}" + echo -e "\e[1mVconsole Configuration:\e[m" >> "${MOTD}" echo -e " - Use the \e[1;92mALT + F1 - F6\e[m keys to change the virtual console." >> "${MOTD}" if echo "${HOOKS[@]}" | grep -qw archboot_keymap ; then - echo -e " - Use the \e[1;92m'km'\e[m script to change to a non-US keymap." >> "${MOTD}" + echo -e " - Use the \e[1;92m'vconsole'\e[m script to change to a non-US keymap." >> "${MOTD}" fi if echo "${HOOKS[@]}" | grep -qw archboot_net_common ; then echo -e "\e[1mNetwork Configuration:\e[m" >> "${MOTD}" diff --git a/usr/lib/initcpio/install/archboot_keymap b/usr/lib/initcpio/install/archboot_vconsole similarity index 93% rename from usr/lib/initcpio/install/archboot_keymap rename to usr/lib/initcpio/install/archboot_vconsole index 8037881d4..be20c02da 100644 --- a/usr/lib/initcpio/install/archboot_keymap +++ b/usr/lib/initcpio/install/archboot_vconsole @@ -5,7 +5,7 @@ build () { add_full_dir "/usr/share/kbd" - add_file /usr/bin/archboot-km.sh /usr/bin/km + add_file /usr/bin/archboot-vconsole.sh /usr/bin/vconsole #add kbd binaries map add_binary dumpkeys kbd_mode chvt deallocvt fgconsole getkeycodes kbdinfo kbdrate loadunimap mapscrn openvt psfaddtable psfgettable psfstriptable psfxtable setkeycodes setleds setmetamode setvtrgb showconsolefont showkey unicode_start unicode_stop vlock # only add resizecons on x86_64