diff --git a/bin/check-translate.sh b/bin/check-translate.sh new file mode 100755 index 0000000..d590571 --- /dev/null +++ b/bin/check-translate.sh @@ -0,0 +1,16 @@ +#!/usr/bin/bash + +fns=($(awk -F'=' '/^_/ {print $1}' "../data/translations/english.trans")) + +for lg in ../data/translations/*.trans ; do + trans=$(<"${lg}") + not=$(echo "${trans}" | grep -cE "#.*translate me") + echo -e "\n-- $(basename "${lg}") ${not} to translate --" + for key in "${fns[@]}"; do + if [[ ! $trans =~ $key ]]; then + echo -e "\t${key} not exist" + fi + done +done + +#echo -e "${fns[*]}" \ No newline at end of file diff --git a/data/translations/danish.trans b/data/translations/danish.trans index 6f0cd22..b0e442a 100644 --- a/data/translations/danish.trans +++ b/data/translations/danish.trans @@ -221,7 +221,7 @@ _FSBody="\nExt4 anbefales. Ikke alle filsystemer er brugbare til Root eller Boot _FSSkip="Spring over / Ingen" _FSMount="Monter" _FSWarn1="Alle data på" -_FSWarn2="vil gå uigenkaldeligt tabt!" +_FSWarn2="vil gå uigenkaldeligt tabt" # Select Root _SelRootBody="\nFørste parttion er ROOT ('/'). Dette er hvor Manjaro skal installeres." @@ -293,6 +293,11 @@ _DEInfoBody="\nFlere miljøer kan installeres.\n\nGnome og LXDE installerer disp # Install DE Menu _InstDETitle="Installer Skrivebords Miljø(er)" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Skrivebords Miljøer og deres tilhørende pakkegrupper er listet først." _ExtraTitle=" Komplet eller minimum? " _ExtraBody="Denne udgave findes i to varianter" @@ -396,3 +401,4 @@ _MMBody="\nHvert trin skal udføres i den angivne rækkefølge. Trin 4-8 er alle # Close Installer _CloseInstBody="Afslut installation?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/dutch.trans b/data/translations/dutch.trans index f8dd390..119d8c4 100644 --- a/data/translations/dutch.trans +++ b/data/translations/dutch.trans @@ -220,7 +220,7 @@ _FSBody="\nExt4 is hier aanbevolen. Niet alle bestandsystemen zijn geschikt voor _FSSkip="Sla over / Geen" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be lost" # translate me ! # Selecteer Root _SelRootBody="\nSelecteer de ROOT Partitie. Dit is waar Manjaro zal worden geïnstalleerd." @@ -292,6 +292,11 @@ _DEInfoBody="\nmeerdere Desktop Suites kunnen worden geïnstalleerd.\n\nGnome en # Installeer DE Menu _InstDETitle="Installeer Desktop Suites" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Desktop Suites en hun verwante pakketten staan bovenaan de lijst." _ExtraTitle=" Full or minimal? " # translate me " _ExtraBody="This edition is offered in two versions" # translate me " @@ -395,3 +400,4 @@ _MMBody="\nElke stap moet IN VOLGORDE uitgevoerd worden. Eenmaal alles is afgewe # Sluit Installer _CloseInstBody="Installatieprogramma Afsluiten?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/english.trans b/data/translations/english.trans index b89dab2..57a75a8 100644 --- a/data/translations/english.trans +++ b/data/translations/english.trans @@ -219,7 +219,7 @@ _FSBody="\nExt4 is recommended. Not all filesystems are viable for Root or Boot _FSSkip="Skip / None" _FSMount="Mount" _FSWarn1="Data on" -_FSWarn2="will be lost!" +_FSWarn2="will be lost" # Select Root _SelRootBody="\nSelect ROOT Partition. This is where Manjaro will be installed." @@ -291,6 +291,11 @@ _DEInfoBody="\nMultiple environments can be installed.\n\nGnome and LXDE come wi # Install DE Menu _InstDETitle="Install Desktop Environments" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" +_ErrInit="Wrong init system" +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" +_DiffPro="Select different profile" +_InstSystd="Install systemd base" _InstDEBody="Desktop Environments and their related package groups are listed first." _ExtraTitle=" Full or minimal? " _ExtraBody="This edition is offered in two versions" @@ -394,3 +399,4 @@ _MMBody="\nEach step must be followed IN ORDER. Steps 4-8 are all optional. Once # Close Installer _CloseInstBody="Close installer?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." diff --git a/data/translations/french.trans b/data/translations/french.trans index 2e114f0..2ff8cf1 100644 --- a/data/translations/french.trans +++ b/data/translations/french.trans @@ -85,7 +85,7 @@ _LuksEncryptBody="\nSélectionner une partition à crypter." _LuksEncruptSucc="\nTerminé ! Ouvert et prêt pour LVM (recommandé) ou montage direct.\n" _LuksPartErrBody="\nUn minimum de deux partitions est nécessaire pour le cryptage :\n\n1. Root (/) - partition standard ou lvm.\n\n2. Boot (/boot ou /boot/efi) - partition standard uniquement (excepté lvm utilisant BIOS Grub).\n" _SelLuksRootBody="\nSélectionner la partition ROOT (/) à crypter. Manjaro sera installé dans cette partition.\n\n" -_SelLuksRootBody="\nEntrer un mot de passe pour crypter/décrypter la partition. Le mot de passe ne doit pas être le même que celui du compte utilisateur ou administrateur.\n" +_LuksPassBody="\nEntrer un mot de passe pour crypter/décrypter la partition. Le mot de passe ne doit pas être le même que celui du compte utilisateur ou administrateur.\n" _LuksWaitBody="\nCréation d'une partition Root crypté :" _LuksWaitBody2="Périphérique ou volume utilisé :" _LuksCipherKey="\nDès que les drapeaux spécifiés sont modifiés, ils peuvent être automatiquement utilisés avec la commande 'cryptsetup -q luksFormat /dev/...'.\n\nNOTE : Les fichiers de clé ne sont pas supportés ; Ils peuvent être ajoutés manuellement après l'installation. Ne spécifier aucuns drapeaux additionnels du genre -v (--verbose) ou -y (verify-passphrase).\n" @@ -106,11 +106,11 @@ _LvmPvConfBody1="\nConfirmer la création du groupe de volume" _LvmPvConfBody2="avec les partitions suivantes :\n\n" _LvmPvActBody1="\nCréation et activation du groupe de volume" _LvmPvDoneBody1="\nLe groupe de volume" -LvmPvDoneBody2="a été créé" +_LvmPvDoneBody2="a été créé" _LvmLvNumBody1="\nUtiliser [barre espace] pour sélectionner le nombre de volumes logiques (LVs) à créer dans" _LvmLvNumBody2="\n\nLe dernier (ou seul) LV utilisera automatiquement 100% de l'espace restant dans le groupe de volume." _LvmLvNameBody1="\nEntrer le nom du volume logique (LV) à créer.\n\nCeci ressemble à une configuration de nom / d'étiquette pour une partition.\n" -LvmLvNameBody2="\nNOTE : Ce LV utilisera automatiquement tout l'espace restant dans le groupe de volume" +_LvmLvNameBody2="\nNOTE : Ce LV utilisera automatiquement tout l'espace restant dans le groupe de volume" _LvmLvNameErrBody="\nNom entré incorrect. Le nom du volume logique (LV) peut contenir des caractères alphanumériques, mais ne peut pas contenir d'espaces ou être précédé par un « / ».\n\n" _LvmLvSizeBody1="restant" _LvmLvSizeBody2="\n\nEntrer la taille du volume logique (LV) en Mégaoctets (M) ou en Gigaoctets (G). Par exemple, 100M créera un VL de 100 Mégaoctets. 10G créera un VL de 10 Gigaoctets.\n" @@ -221,7 +221,7 @@ _FSBody="\nExt4 est recommandé. Tous les systèmes de fichiers ne sont pas expl _FSSkip="Passer / Aucun" _FSMount="Monter" _FSWarn1="Données dans" -_FSWarn2="seront perdues!" +_FSWarn2="seront perdues" # Sélectionner Root _SelRootBody="\nSélectionner la partition racine (ROOT) où Manjaro sera installé." @@ -293,6 +293,11 @@ _DEInfoBody="\nPlusieurs environnements peuvent être installés.\n\nGnome et LX # Menu d'installation DE _InstDETitle="Installer le ou les environnements de bureau" +_InstManDEBody="Choisir un environnement Manjaro.\n\nNoter qu'ils sont disponibles en ce moment uniquement pour une base systemd:" +_ErrInit="Mauvais système d'init" +_WarnInit="est disponible avec systemd uniquement\nMerçi d'ajuster votre sélection:" +_DiffPro="Sélectionner un autre profil" +_InstSystd="Installer la base systemd" _InstDEBody="Les environnements de bureau ainsi que leurs groupes de paquets associés sont référencés en premier." _ExtraTitle=" Complète ou minimale? " _ExtraBody="Cette édition est disponible en deux versions" @@ -396,3 +401,4 @@ _MMBody="\nChaque étape doit être suivie DANS L'ORDRE. Les étapes 4-8 sont to # Fermer l'installateur _CloseInstBody="Fermer l'installateur ?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/german.trans b/data/translations/german.trans index 67eeda9..fc07287 100644 --- a/data/translations/german.trans +++ b/data/translations/german.trans @@ -219,7 +219,7 @@ _FSBody="\nExt4 is recommended. Not all filesystems are viable for Root or Boot _FSSkip="Skip / None" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be lost" # translate me ! # Select Root _SelRootBody="\nSelect ROOT Partition. This is where Manjaro will be installed." @@ -291,6 +291,11 @@ _DEInfoBody="\nMultiple environments can be installed.\n\nGnome and LXDE come wi # Install DE Menu _InstDETitle="Install Desktop Environments" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Desktop Environments and their related package groups are listed first." _ExtraTitle=" Full or minimal? " # translate me " _ExtraBody="This edition is offered in two versions" # translate me " @@ -394,3 +399,4 @@ _MMBody="\nEach step must be followed IN ORDER. Steps 4-8 are all optional. Once # Close Installer _CloseInstBody="Close installer?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/hungarian.trans b/data/translations/hungarian.trans index 4877735..45ade8e 100644 --- a/data/translations/hungarian.trans +++ b/data/translations/hungarian.trans @@ -220,7 +220,7 @@ _FSBody="\nExt4 az ajánlott. Nem minden fájlrendszer alkalmas Root vagy Boot _FSSkip="Kihagyás / egyik sem" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be los" # translate me ! # Gyökérpartíció (ROOT) kiválasztása _SelRootBody="\nVálassz gyökérpartíciót (ROOT). Ez lesz ahová az Archot telepítjük." @@ -292,6 +292,11 @@ _DEInfoBody="\nTöbb környezetben is telepíthető.\n\nGnome és LXDE tartalmaz # Asztali környezetek telepítése menü _InstDETitle="Asztali környezetek telepítése " +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Az asztali környezetek, és a hozzájuk tartozó programcsoportok lesznek listázva először." _ExtraTitle=" Full or minimal? " # translate me ! _ExtraBody="This edition is offered in two versions" # translate me ! @@ -395,3 +400,4 @@ _MMBody="\nMinden szükséges lépést követned kell a telepítés érdekében. # Telepítő bezárása _CloseInstBody="Bezárod a telepítőt?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/italian.trans b/data/translations/italian.trans index bfe861c..8bbfa1b 100644 --- a/data/translations/italian.trans +++ b/data/translations/italian.trans @@ -220,7 +220,7 @@ _FSBody="\nExt4 è la scelta consigliata. Non tutti i filesystem sono utilizzabi _FSSkip="Salta / Nessuno" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be lost" # translate me ! # Select Root _SelRootBody="\nSelezionare partizione ROOT. Manjaro sarà installata qui." @@ -292,6 +292,11 @@ _DEInfoBody="\nPossono essere installati più ambienti.\n\nGnome e LXDE includon # Install DE Menu _InstDETitle="Installazione Ambiente Desktop" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Gli ambienti desktop e i pacchetti relativi sono indicati per primi." _ExtraTitle=" Full or minimal? " # translate me ! _ExtraBody="This edition is offered in two versions" # translate me ! @@ -395,3 +400,4 @@ _MMBody="\nOgni passaggio deve essere eseguito IN ORDINE. I passaggi 4-8 sono op # Chiudere il programma di istallazione _CloseInstBody="Chiudere il programma di installazione?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/portuguese.trans b/data/translations/portuguese.trans index 3da8e3c..a8a7b5e 100644 --- a/data/translations/portuguese.trans +++ b/data/translations/portuguese.trans @@ -220,7 +220,7 @@ _FSBody="\nExt4 é recomendado. Nem todos os sistemas de arquivos são viáveis _FSSkip="Saltar/ Nenhum" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be lost" # translate me ! # Seleccionar Root _SelRootBody="\nSeleccione a partição ROOT. Este é o lugar onde Manjaro será instalado." @@ -292,6 +292,11 @@ _DEInfoBody="\nVários ambientes podem ser instalados.\n\nGnome e LXDE vem com u # Menu de instalação dos Ambientes de Desktop _InstDETitle="Instalar os Ambientes de Desktop" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Ambientes de desktop e seus grupos de pacotes relacionados são listados primeiro." _ExtraTitle=" Full or minimal? " # translate me ! _ExtraBody="This edition is offered in two versions" # translate me ! @@ -395,3 +400,4 @@ _MMBody="\nCada passo deve ser seguido NA ORDEM. Os passos 4-8 são todos opcion # Fechar o instalador _CloseInstBody="Fechar o instalador?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/portuguese_brasil.trans b/data/translations/portuguese_brasil.trans index 3193d47..7c93afd 100644 --- a/data/translations/portuguese_brasil.trans +++ b/data/translations/portuguese_brasil.trans @@ -220,7 +220,7 @@ _FSBody="\nExt4 é recomendado. Nem todos os sistemas de arquivos são viáveis _FSSkip="Pular / Nenhum" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be lost" # translate me ! # Selecionar Root _SelRootBody="\nSelecione a partição ROOT. Este é o lugar onde Manjaro será instalado." @@ -292,6 +292,11 @@ _DEInfoBody="\nVários ambientes podem ser instalados.\n\nGnome e LXDE vem com u # Menu de instalação dos ambientes de desktop _InstDETitle="Instalar os ambientes de desktop" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Ambientes de desktop são listados primeiro, e podem ter múltiplas opções de download." _ExtraTitle=" Full or minimal? " # translate me ! _ExtraBody="This edition is offered in two versions" # translate me ! @@ -395,3 +400,4 @@ _MMBody="\nCada passo deve ser seguido NA ORDEM. Os passos 4-8 são todos opcion # Fechar o instalador _CloseInstBody="Fechar o instalador?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/russian.trans b/data/translations/russian.trans index 46cfeee..d0cab32 100644 --- a/data/translations/russian.trans +++ b/data/translations/russian.trans @@ -220,7 +220,7 @@ _FSBody="\nРекомендуется использовать Ext4. Не все _FSSkip="Пропустить / Ничего" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be lost" # translate me ! # Select Root _SelRootBody="\nВыберите ROOT раздел. Это тот раздел куда будет устанавливаться Manjaro." @@ -292,6 +292,11 @@ _DEInfoBody="\nМожно установить несколько окружен # Install DE Menu _InstDETitle="Установка окружения рабочего стола" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Окружения рабочего стола и связанные с ними группы пакетов отображаются в первую очередь." _ExtraTitle=" Full or minimal? " # translate me ! _ExtraBody="This edition is offered in two versions" # translate me ! @@ -395,3 +400,4 @@ _MMBody="\nКаждый шаг должен идти ПО ПОРЯДКУ. Шаг # Close Installer _CloseInstBody="Закрыть установщик?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/data/translations/spanish.trans b/data/translations/spanish.trans index 3489356..0ca7292 100644 --- a/data/translations/spanish.trans +++ b/data/translations/spanish.trans @@ -220,7 +220,7 @@ _FSBody="\nSe recomienda el sistema de archivos Ext4. No todos los sistemas de a _FSSkip="Saltar / Ninguno" _FSMount="Mount" # translate me ! _FSWarn1="Data on" # translate me ! -_FSWarn2="will be lost!" # translate me ! +_FSWarn2="will be lost" # translate me ! # Seleccionar raíz _SelRootBody="\nSeleccione la partición RAÍZ. Aquí es donde se instalará Manjaro." @@ -292,6 +292,11 @@ _DEInfoBody="\nSe pueden instalar varios entornos de escritorio.\n\nGnome y LXDE # Menú de instalación de entornos de escritorio _InstDETitle="Instalar entornos de escritorio" +_InstManDEBody="Please choose a Manjaro Environment.\n\nNote that the following are currently available for systemd base only:" # translate me ! +_ErrInit="Wrong init system" # translate me ! +_WarnInit="is currently available for systemd only\nPlease adjust your selection:" # translate me ! +_DiffPro="Select different profile" # translate me ! +_InstSystd="Install systemd base" # translate me ! _InstDEBody="Primero se listan los entornos de escritorio y sus grupos de paquetes relacionados." _ExtraTitle=" Full or minimal? " # translate me ! _ExtraBody="This edition is offered in two versions" # translate me ! @@ -395,3 +400,4 @@ _MMBody="\nCada paso se ha de seguir en ESTRICTO ORDEN. Los pasos 4 a 8 son opci # Cerrar instalador _CloseInstBody="¿Desea cerrar el instalador?" +_LogInfo="Would you like to keep the install-log?\nIt will be copied to /.m-a.log of the target install, accessible with root permissions only." # translate me ! diff --git a/lib/util-base.sh b/lib/util-base.sh index 0a61966..3605eae 100644 --- a/lib/util-base.sh +++ b/lib/util-base.sh @@ -74,11 +74,11 @@ set_timezone() { DIALOG " $_ConfBseTimeHC " --menu "$_TimeSubZBody" 0 0 11 ${SUBZONE} 2>${ANSWER} || config_base_menu SUBZONE=$(cat ${ANSWER}) - DIALOG " $_ConfBseTimeHC " --yesno "$_TimeZQ ${ZONE}/${SUBZONE}?" 0 0 + DIALOG " $_ConfBseTimeHC " --yesno "\n$_TimeZQ ${ZONE}/${SUBZONE}?\n" 0 0 if (( $? != 0 )); then arch_chroot "ln -sf /usr/share/zoneinfo/${ZONE}/${SUBZONE} /etc/localtime" 2>$ERR - check_for_error "$FUNCNAME" $? config_base_menu + check_for_error "$FUNCNAME ${ZONE}/${SUBZONE}" $? config_base_menu else config_base_menu fi @@ -239,7 +239,7 @@ install_base() { KERNEL="n" mhwd-kernel -l | awk '/linux/ {print $2}' > /tmp/.available_kernels kernels=$(cat /tmp/.available_kernels) - [[ -e /tmp/.base_installed ]] && rm /tmp/.base_installed + [[ -e /mnt/.base_installed ]] && rm /mnt/.base_installed # User to select initsystem DIALOG " $_ChsInit " --menu "$_WarnOrc" 0 0 2 \ @@ -249,10 +249,12 @@ install_base() { install_base_menu fi if [[ $(cat ${INIT}) -eq 2 ]]; then - touch /tmp/.openrc + check_for_error "init openrc" + touch /mnt/.openrc cat /usr/share/manjaro-architect/package-lists/base-openrc-manjaro > /tmp/.base else - [[ -e /tmp/.openrc ]] && rm /tmp/.openrc + check_for_error "init systemd" + [[ -e /mnt/.openrc ]] && rm /mnt/.openrc cat /usr/share/manjaro-architect/package-lists/base-systemd-manjaro > /tmp/.base fi @@ -264,6 +266,8 @@ install_base() { if [[ $(cat ${PACKAGES}) == "" ]]; then install_base_menu fi + check_for_error "selected: $(cat ${PACKAGES})" + # Choose wanted kernel modules DIALOG "$_ChsAddPkgs" --checklist "\n\n$_UseSpaceBar" 0 0 12 \ "KERNEL-headers" "-" off \ @@ -281,6 +285,7 @@ install_base() { if [[ $(cat /tmp/.modules) == "" ]]; then install_base_menu fi + check_for_error "modules: $(cat /tmp/.modules)" for kernel in $(cat ${PACKAGES} | grep -v "base-devel") ; do cat /tmp/.modules | sed "s/KERNEL/\ $kernel/g" >> /tmp/.base done @@ -290,6 +295,7 @@ install_base() { # Check to see if a kernel is already installed ls ${MOUNTPOINT}/boot/*.img >/dev/null 2>&1 if [[ $? == 0 ]]; then + check_for_error "linux-$(ls ${MOUNTPOINT}/boot/*.img | cut -d'-' -f2) is already installed" KERNEL="y" else for i in $(cat /tmp/.available_kernels); do @@ -300,19 +306,21 @@ install_base() { # If no kernel selected, warn and restart if [[ $KERNEL == "n" ]]; then DIALOG " $_ErrTitle " --msgbox "$_ErrNoKernel" 0 0 + check_for_error "no kernel selected." install_base else - + check_for_error "packages to install: $(cat /tmp/.base | tr '\n' ' ')" # If at least one kernel selected, proceed with installation. basestrap ${MOUNTPOINT} $(cat /tmp/.base) 2>$ERR check_for_error "install basepkgs" $? install_base # If root is on btrfs volume, amend mkinitcpio.conf - [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf + [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == btrfs ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf && \ + check_for_error "root on btrfs volume. amend mkinitcpio." # If root is on nilfs2 volume, amend mkinitcpio.conf - [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == nilfs2 ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf - + [[ $(lsblk -lno FSTYPE,MOUNTPOINT | awk '/ \/mnt$/ {print $1}') == nilfs2 ]] && sed -e '/^HOOKS=/s/\ fsck//g' -i ${MOUNTPOINT}/etc/mkinitcpio.conf && \ + check_for_error "root on nilfs2 volume. amend mkinitcpio." # Use mhwd to install selected kernels with right kernel modules # This is as of yet untested @@ -333,12 +341,13 @@ install_base() { # if branch was chosen, use that also in installed system. If not, use the system setting if [[ -e ${BRANCH} ]]; then sed -i "/Branch =/c\Branch = $(cat ${BRANCH})/" ${MOUNTPOINT}/etc/pacman-mirrors.conf 2>$ERR - check_for_error "set target branch -> $(cat ${BRANCH})" $? install_base + check_for_error "set target branch $(cat ${BRANCH})" $? install_base else sed -i "/Branch =/c$(grep "Branch =" /etc/pacman-mirrors.conf)" ${MOUNTPOINT}/etc/pacman-mirrors.conf 2>$ERR check_for_error "use host branch \($(grep "Branch =" /etc/pacman-mirrors.conf)\)" $? install_base fi - touch /tmp/.base_installed + touch /mnt/.base_installed + check_for_error "base installed succesfully." fi fi } @@ -568,8 +577,8 @@ install_cups() { if [[ $(cat ${PACKAGES} | grep "cups") != "" ]]; then DIALOG " $_InstNMMenuCups " --yesno "$_InstCupsQ" 0 0 if [[ $? -eq 0 ]]; then - # Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist. - if [[ -e /tmp/.openrc ]]; then + # Add openrc support. If openrcbase was installed, the file /mnt/.openrc should exist. + if [[ -e /mnt/.openrc ]]; then #statements arch_chroot "rc-update add cupsd default" 2>$ERR else diff --git a/lib/util-desktop.sh b/lib/util-desktop.sh index 07137af..04495bf 100644 --- a/lib/util-desktop.sh +++ b/lib/util-desktop.sh @@ -77,12 +77,12 @@ install_manjaro_de_wm() { echo "" > /tmp/.desktop # DE/WM Menu - DIALOG " $_InstDETitle " --radiolist "$_InstDEBody\n\n$_UseSpaceBar" 0 0 12 \ + DIALOG " $_InstDETitle " --radiolist "\n$_InstManDEBody\n$(evaluate_profiles)\n\n$_UseSpaceBar" 0 0 12 \ $(echo $PROFILES/{manjaro,community}/* | xargs -n1 | cut -f7 -d'/' | grep -vE "netinstall|architect" | awk '$0=$0" - off"') 2> /tmp/.desktop # If something has been selected, install if [[ $(cat /tmp/.desktop) != "" ]]; then - check_for_error "manjaro_de_wm selected: $(cat /tmp/.desktop)" + check_for_error "selected: [Manjaro-$(cat /tmp/.desktop)]" clear # Source the iso-profile profile=$(echo $PROFILES/*/$(cat /tmp/.desktop)/profile.conf) @@ -93,7 +93,8 @@ install_manjaro_de_wm() { # Parse package list based on user input and remove parts that don't belong to pacman cat $PROFILES/shared/Packages-Root "$target_desktop" > /tmp/.edition - if [[ -e /tmp/.openrc ]]; then + if [[ -e /mnt/.openrc ]]; then + evaluate_openrc # Remove any packages tagged with >systemd and remove >openrc tags sed -i '/>systemd/d' /tmp/.edition sed -i 's/>openrc //g' /tmp/.edition @@ -133,8 +134,10 @@ install_manjaro_de_wm() { "2" "minimal" 2>/tmp/.version if [[ $(cat /tmp/.version) -eq 2 ]]; then + check_for_error "selected 'minimal' profile" touch /tmp/.minimal else + check_for_error "selected 'full' profile" [[ -e /tmp/.minimal ]] && rm /tmp/.minimal fi fi @@ -172,6 +175,8 @@ install_manjaro_de_wm() { # remove zsh sed -i '/^zsh$/d' /tmp/.edition + check_for_error "packages to install: $(cat /tmp/.edition | tr '\n' ' ')" + # basestrap the parsed package list to the new root basestrap -i ${MOUNTPOINT} $(cat /tmp/.edition /usr/share/manjaro-architect/package-lists/input-drivers | sort | uniq) 2>$ERR check_for_error "install pkgs: $(cat /tmp/.desktop)" "$?" @@ -193,7 +198,7 @@ install_manjaro_de_wm() { fi # Enable services in the chosen profile echo "Enabling services" - if [[ -e /tmp/.openrc ]]; then + if [[ -e /mnt/.openrc ]]; then eval $(grep -e "enable_openrc=" $profile | sed 's/# //g') echo "${enable_openrc[@]}" | xargs -n1 > /tmp/.services echo /mnt/etc/init.d/* | xargs -n1 | cut -d/ -f5 > /tmp/.available_services @@ -287,7 +292,7 @@ install_manjaro_de_wm_pkg() { PROFILES="/usr/share/manjaro-tools/iso-profiles" # Only show this information box once if [[ $SHOW_ONCE -eq 0 ]]; then - DIALOG " $_InstDETitle " --msgbox "$_InstPBody" 0 0 + DIALOG " $_InstDETitle " --msgbox "\n$_InstPBody\n\n" 0 0 SHOW_ONCE=1 fi clear @@ -305,7 +310,7 @@ install_manjaro_de_wm_git() { PROFILES="$DATADIR/profiles" # Only show this information box once if [[ $SHOW_ONCE -eq 0 ]]; then - DIALOG " $_InstDETitle " --msgbox "$_InstPBody" 0 0 + DIALOG " $_InstDETitle " --msgbox "\n$_InstPBody\n\n" 0 0 SHOW_ONCE=1 fi clear @@ -325,7 +330,7 @@ install_manjaro_de_wm_git() { install_dm() { # Save repetition of code enable_dm() { - if [[ -e /tmp/.openrc ]]; then + if [[ -e /mnt/.openrc ]]; then sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"$(cat ${PACKAGES})\"/g" /mnt/etc/conf.d/xdm arch_chroot "rc-update add xdm default" 2>$ERR check_for_error "$FUNCNAME" "$?" @@ -414,15 +419,15 @@ set_sddm_ck() { install_nm() { # Save repetition of code enable_nm() { - # Add openrc support. If openrcbase was installed, the file /tmp/.openrc should exist. + # Add openrc support. If openrcbase was installed, the file /mnt/.openrc should exist. if [[ $(cat ${PACKAGES}) == "NetworkManager" ]]; then - if [[ -e /tmp/.openrc ]]; then + if [[ -e /mnt/.openrc ]]; then arch_chroot "rc-update add NetworkManager default" 2>$ERR else arch_chroot "systemctl enable NetworkManager NetworkManager-dispatcher" >/tmp/.symlink 2>$ERR fi else - if [[ -e /tmp/.openrc ]]; then + if [[ -e /mnt/.openrc ]]; then arch_chroot "rc-update add $(cat ${PACKAGES}) default" 2>$ERR else arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>$ERR diff --git a/lib/util-disk.sh b/lib/util-disk.sh index c67b6c5..35e5312 100644 --- a/lib/util-disk.sh +++ b/lib/util-disk.sh @@ -328,18 +328,18 @@ mount_partitions() { mount_current_partition() { # Make the mount directory mkdir -p ${MOUNTPOINT}${MOUNT} 2>$ERR + check_for_error "create mountpoint" "$?" # Get mounting options for appropriate filesystems [[ $fs_opts != "" ]] && mount_opts # Use special mounting options if selected, else standard mount if [[ $(cat ${MOUNT_OPTS}) != "" ]]; then - mount -o $(cat ${MOUNT_OPTS}) ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>$ERR + mount -o $(cat ${MOUNT_OPTS}) ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>>$LOGFILE else - mount ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>$ERR + mount ${PARTITION} ${MOUNTPOINT}${MOUNT} 2>>$LOGFILE fi - - check_for_error "$FUNCNAME" "$?" + check_for_error "mount -o $(cat ${MOUNT_OPTS}) ${PARTITION} ${MOUNTPOINT}${MOUNT}" confirm_mount ${MOUNTPOINT}${MOUNT} # Identify if mounted partition is type "crypt" (LUKS on LVM, or LUKS alone) diff --git a/lib/util-menu.sh b/lib/util-menu.sh index e0cc709..0dfa4c5 100644 --- a/lib/util-menu.sh +++ b/lib/util-menu.sh @@ -46,8 +46,13 @@ main_menu_online() { ;; *) dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody" 0 0 if [[ $? -eq 0 ]]; then + check_for_error "exit installer." + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "\n$_LogInfo\n" 0 0 + if [[ $? -eq 0 ]]; then + [[ -e /mnt/.m-a.log ]] && cat ${LOGFILE} >> /mnt/.m-a.log + install -m700 ${LOGFILE} /mnt/.m-a.log + fi umount_partitions - [[ -e /tmp/.openrc ]] && rm /tmp/.openrc clear exit 0 fi @@ -115,6 +120,7 @@ install_base_menu() { pacman-key --init pacman-key --populate archlinux manjaro pacman-key --refresh-keys + check_for_error "refresh pacman-keys" ;; "3") install_base ;; diff --git a/lib/util.sh b/lib/util.sh index 91fd5d0..44b2768 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -354,7 +354,7 @@ check_mount() { # Ensure that Manjaro has been installed check_base() { - if [[ ! -e /tmp/.base_installed ]]; then + if [[ ! -e /mnt/.base_installed ]]; then DIALOG " $_ErrTitle " --msgbox "$_ErrNoBase" 0 0 install_base_menu fi @@ -387,10 +387,11 @@ evaluate_profiles() { # verify if profile is available for openrc evaluate_openrc() { - if [[ ! $(grep ">openrc" /tmp/.edition) ]]; then - DIALOG "Wrong init system" --menu "Profile [$(cat /tmp/.desktop)] is currently not ready for openrc\nPlease adjust your selection:" 0 0 2 \ - "1" "Select different profile" \ - "2" "Install systemd base" 2>${ANSWER} + if [[ ! $(grep ">openrc" $PROFILES/*/$(cat /tmp/.desktop)/Packages-Desktop) ]]; then + DIALOG "$_ErrInit" --menu "\n[Manjaro-$(cat /tmp/.desktop)] $_WarnInit\n" 0 0 2 \ + "1" "$_DiffPro" \ + "2" "$_InstSystd" 2>${ANSWER} + check_for_error "selected systemd-only profile [$(cat /tmp/.desktop)] with openrc base. -> $(cat ${ANSWER})" case $(cat ${ANSWER}) in "1") install_desktop_menu ;;