From 09496d9410aa8ea3d0b5c72571e44b3dec4ec749 Mon Sep 17 00:00:00 2001 From: farhan Date: Mon, 28 Feb 2022 15:29:22 +0000 Subject: [PATCH 01/12] added log files to gitignore --- .gitignore | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a20aba1..305aa56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,10 @@ install.conf installlog.txt archnikus.code-workspace -setup.conf \ No newline at end of file +configs/setup.conf +# keep logs out +startup.log +0-preinstall.log +1-setup.log +2-user.log +3-post-setup.log \ No newline at end of file From 7f88b3bcdafb3daca89fdac4854809e1df391490 Mon Sep 17 00:00:00 2001 From: farhan Date: Mon, 28 Feb 2022 15:43:38 +0000 Subject: [PATCH 02/12] background checks --- scripts/startup.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/startup.sh b/scripts/startup.sh index baf0e75..9fe88a9 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -16,6 +16,28 @@ set_option() { fi echo "${1}=${2}" >>$CONFIG_FILE # add option } + +root_check() { + if [[ "$(id -u)" != "0" ]]; then + echo -ne "ERROR! This script must be run under the 'root' user!\n" + exit 0 + fi +} + +docker_check() { + if awk -F/ '$2 == "docker"' /proc/self/cgroup | read -r; then + echo -ne "ERROR! Docker container is not supported (at the moment)\n" + exit 0 + elif [[ -f /.dockerenv ]]; then + echo -ne "ERROR! Docker container is not supported (at the moment)\n" + exit 0 + fi +} + +background_checks() { + root_check + docker_check +} # Renders a text based list of options that can be selected by the # user using up, down and enter keys and returns the chosen option. # From 719273b4c35b1c7557c99354c1d2577b00537af0 Mon Sep 17 00:00:00 2001 From: farhan Date: Mon, 28 Feb 2022 15:44:35 +0000 Subject: [PATCH 03/12] background checks 2 --- scripts/startup.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/startup.sh b/scripts/startup.sh index 9fe88a9..50aa0a1 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -34,8 +34,25 @@ docker_check() { fi } +arch_check() { + if [[ ! -e /etc/arch-release ]]; then + echo -ne "ERROR! This script must be run in Arch Linux!\n" + exit 0 + fi +} + +pacman_check() { + if [[ -f /var/lib/pacman/db.lck ]]; then + echo "ERROR! Pacman is blocked." + echo -ne "If not running remove /var/lib/pacman/db.lck.\n" + exit 0 + fi +} + background_checks() { root_check + arch_check + pacman_check docker_check } # Renders a text based list of options that can be selected by the From a6e565ad172354097485c103f0442e9fb98038d5 Mon Sep 17 00:00:00 2001 From: farhan Date: Mon, 28 Feb 2022 15:46:36 +0000 Subject: [PATCH 04/12] background checks 3 --- scripts/startup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/startup.sh b/scripts/startup.sh index 50aa0a1..258c6b9 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -340,6 +340,7 @@ installtype () { # language (){} # Starting functions +background_checks clear logo userinfo From 963f367f9b846ae5c1cef88c8109dea07638d00d Mon Sep 17 00:00:00 2001 From: Slavko Stojshic Date: Wed, 2 Mar 2022 17:43:33 +0100 Subject: [PATCH 05/12] Changed hardcoded list of DE/WM's to the list that will list DE/WM's that are available in pkg-files folder, so you could just add new WM to the list of options by adding new .txt file and populating list of apps you want (bspwm.txt, i3.txt...) --- scripts/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index baf0e75..d0cf14f 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -281,7 +281,7 @@ aurhelper () { desktopenv () { # Let the user choose Desktop Enviroment from predefined list echo -ne "Please select your desired Desktop Enviroment:\n" - options=(gnome kde cinnamon xfce mate budgie lxde deepin openbox server) + options=( `for f in pkg-files/*.txt; do echo "$f" | sed -r "s/.+\/(.+)\..+/\1/"; done` ) select_option $? 4 "${options[@]}" desktop_env=${options[$?]} set_option DESKTOP_ENV $desktop_env From 9b9c2ee37f94df11f84694dac1ea1ee8f1cc2af2 Mon Sep 17 00:00:00 2001 From: Slavko Stojshic Date: Wed, 2 Mar 2022 18:04:22 +0100 Subject: [PATCH 06/12] Remove leftover aur-pkgs.txt and pacman-pkgs.txt from list of DE/WM's --- scripts/startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index d0cf14f..9d11105 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -281,7 +281,7 @@ aurhelper () { desktopenv () { # Let the user choose Desktop Enviroment from predefined list echo -ne "Please select your desired Desktop Enviroment:\n" - options=( `for f in pkg-files/*.txt; do echo "$f" | sed -r "s/.+\/(.+)\..+/\1/"; done` ) + options=( `for f in pkg-files/*.txt; do echo "$f" | sed -r "s/.+\/(.+)\..+/\1/;/pkgs/d"; done` ) select_option $? 4 "${options[@]}" desktop_env=${options[$?]} set_option DESKTOP_ENV $desktop_env From f7888d5f126aca11f795f2e47ebfe548b3b0d00a Mon Sep 17 00:00:00 2001 From: farhan Date: Thu, 3 Mar 2022 18:03:56 +0000 Subject: [PATCH 07/12] password function --- scripts/startup.sh | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/scripts/startup.sh b/scripts/startup.sh index baf0e75..d4ccb5b 100755 --- a/scripts/startup.sh +++ b/scripts/startup.sh @@ -16,6 +16,20 @@ set_option() { fi echo "${1}=${2}" >>$CONFIG_FILE # add option } + +set_password() { + read -rs -p "Please enter password: " PASSWORD1 + echo -ne "\n" + read -rs -p "Please re-enter password: " PASSWORD2 + echo -ne "\n" + if [[ "$PASSWORD1" == "$PASSWORD2" ]]; then + set_option "$1" "$PASSWORD1" + else + echo -ne "ERROR! Passwords do not match. \n" + set_password + fi +} + # Renders a text based list of options that can be selected by the # user using up, down and enter keys and returns the chosen option. # @@ -153,22 +167,9 @@ case $? in 0) set_option FS btrfs;; 1) set_option FS ext4;; 2) -while true; do - echo -ne "Please enter your luks password: \n" - read -s luks_password # read password without echo - - echo -ne "Please repeat your luks password: \n" - read -s luks_password2 # read password without echo - - if [ "$luks_password" = "$luks_password2" ]; then - set_option LUKS_PASSWORD $luks_password + set_password "LUKS_PASSWORD" set_option FS luks - break - else - echo -e "\nPasswords do not match. Please try again. \n" - fi -done -;; + ;; 3) exit ;; *) echo "Wrong option please select again"; filesystem;; esac @@ -251,20 +252,7 @@ drivessd userinfo () { read -p "Please enter your username: " username set_option USERNAME ${username,,} # convert to lower case as in issue #109 -while true; do - echo -ne "Please enter your password: \n" - read -s password # read password without echo - - echo -ne "Please repeat your password: \n" - read -s password2 # read password without echo - - if [ "$password" = "$password2" ]; then - set_option PASSWORD $password - break - else - echo -e "\nPasswords do not match. Please try again. \n" - fi -done +set_password "PASSWORD" read -rep "Please enter your hostname: " nameofmachine set_option NAME_OF_MACHINE $nameofmachine } From fa98256c5fdbaebd28ca8f33b17edb2881299510 Mon Sep 17 00:00:00 2001 From: farhan Date: Thu, 3 Mar 2022 18:27:32 +0000 Subject: [PATCH 08/12] more updates --- .gitignore | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 305aa56..5ed5a40 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,4 @@ installlog.txt archnikus.code-workspace configs/setup.conf # keep logs out -startup.log -0-preinstall.log -1-setup.log -2-user.log -3-post-setup.log \ No newline at end of file +configs/*.log \ No newline at end of file From aae3a7456759793d2b0cc81092a64908b3ad7e89 Mon Sep 17 00:00:00 2001 From: Gandalf <58650922+Gandalf1607@users.noreply.github.com> Date: Thu, 26 May 2022 13:43:03 +0200 Subject: [PATCH 09/12] Rename awesome.text to awesome.txt --- pkg-files/{awesome.text => awesome.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pkg-files/{awesome.text => awesome.txt} (100%) diff --git a/pkg-files/awesome.text b/pkg-files/awesome.txt similarity index 100% rename from pkg-files/awesome.text rename to pkg-files/awesome.txt From 017732fc25595984029bd177e01ddc6d6e396e96 Mon Sep 17 00:00:00 2001 From: RehanPlayz <63925635+RehanPlayz@users.noreply.github.com> Date: Mon, 30 May 2022 08:27:22 +0300 Subject: [PATCH 10/12] Updated ArchTitus ISO URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index afec16e..3a90b10 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This README contains the steps I do to install and configure a fully-functional Download ArchISO from and put on a USB drive with [Etcher](https://www.balena.io/etcher/), [Ventoy](https://www.ventoy.net/en/index.html), or [Rufus](https://rufus.ie/en/) -If you don't want to build using this script I did create an image @ +If you don't want to build using this script I did create an image @ ## Boot Arch ISO From 7f4a0b281feb1e419d8f47c5e199ba9c87c7a451 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 15:01:54 +0000 Subject: [PATCH 11/12] CI: Automated build push --- REFERENCE-startup.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/REFERENCE-startup.md b/REFERENCE-startup.md index 221d4bf..8eb7353 100644 --- a/REFERENCE-startup.md +++ b/REFERENCE-startup.md @@ -10,7 +10,6 @@ This script will ask users about their prefrences like disk, file system, timezo # Functions * [set_option()](#set_option) -* [select_option()](#select_option) * [logo()](#logo) * [filesystem()](#filesystem) * [timezone()](#timezone) @@ -43,15 +42,6 @@ set options in setup.conf * **$2** (string): Configuration value. -## select_option() - -Renders a text based list of options that can be selected by the -user using up, down and enter keys and returns the chosen option. - - Arguments : list of options, maximum of 256 - "opt1" "opt2" ... - Return value: selected index (0 for opt1, 1 for opt2 ...) - ## logo() Displays ArchTitus logo From a145ff69ec86dc1e0e9dbec3e9c52ad2263b9a8c Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Sat, 30 Jul 2022 11:03:10 -0500 Subject: [PATCH 12/12] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a90b10..68d8735 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This README contains the steps I do to install and configure a fully-functional Download ArchISO from and put on a USB drive with [Etcher](https://www.balena.io/etcher/), [Ventoy](https://www.ventoy.net/en/index.html), or [Rufus](https://rufus.ie/en/) -If you don't want to build using this script I did create an image @ +If you don't want to build using this script I did create an image @ ## Boot Arch ISO