| Hash | Commit message | Author | Date | Files | + | - |
1 | commit b1004623fba9e2e6e6bc4f589b0d6a88a2cb3adc |
2 | Author: nvx1 <[email protected]> |
3 | Date: Tue Mar 29 00:46:32 2022 +0200 |
4 | |
5 | Update. |
6 | --- |
7 | AutoInstall | 21 ++++++++++++++++++--- |
8 | 1 file changed, 18 insertions(+), 3 deletions(-) |
9 | |
10 | diff --git a/AutoInstall b/AutoInstall |
11 | index 8836c96..9bdc1d4 100755 |
12 | --- a/AutoInstall |
13 | +++ b/AutoInstall |
14 | @@ -23,6 +23,8 @@ pkgdir="/opt" |
15 | |
16 | aurhelper="yay" |
17 | |
18 | +TITLE=' ~ Automate OS ~ ' |
19 | + |
20 | mirlist="/etc/pacman.d/mirrorlist" |
21 | |
22 | lmirlist="/etc/pacman.d/local-mirrorlist" |
23 | @@ -41,6 +43,13 @@ bootid="$(lsblk|grep boot |sed 's/p.*$//;s/├─//;s/└─//'|sed 's/^/\/dev\/ |
24 | rmdblck="$([ -f /var/lib/pacman/db.lck ] && rm -rf /var/lib/pacman/db.lck)" |
25 | |
26 | |
27 | +KERNELS=( |
28 | + '1.' 'linux' |
29 | + '2.' 'linux-lts' |
30 | + '3.' 'linux-hardened' |
31 | + '4.' 'linux-zen') |
32 | + |
33 | + |
34 | installpkg(){ pacman --noconfirm --needed -S "$*" >/dev/null 2>&1 ; } |
35 | |
36 | check_root(){ [ "$(id -u)" -ne 0 ] && err "Root priviledges are required to run this script!"; } |
37 | @@ -49,7 +58,7 @@ err(){ echo >&2 "$(tput bold; tput setaf 1)[-] ERROR: ${*}$(tput sgr0)" && $rmdb |
38 | |
39 | |
40 | newmirrors(){ \ |
41 | - dialog --infobox " Testing fastest mirrors for most efficient downloads..." 4 50 |
42 | + dialog --title "$TITLE" --infobox " Testing fastest mirrors for most efficient downloads..." 4 50 |
43 | mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup && reflector --sort rate -a48 -f20 -l20 -c 'ZA,US,UK,Germany,Netherlands' \ |
44 | -p 'http,https' --save /etc/pacman.d/mirrorlist >/dev/null 2>&1 ; } |
45 | |
46 | @@ -62,6 +71,10 @@ whichedition(){ |
47 | initmsg2(){ |
48 | dialog --colors --title " Please Note :" --yes-label " Lets Boogie! " --no-label " Lets not boogie :| " --yesno "\\n An Arch Linux, or Arch based system is required for the installation of AutoLinux.\\n\\n If you are running any other distrobution the installation will fail." 9 90 ; } |
49 | |
50 | +selKernel(){ |
51 | + kernel="$(dialog --stdout --colors --title "Kernel Selection" --menu "\\n Please choose your kernel:\\n\\n (If unsure, just select the default linux kernel)" 14 56 6 "${KERNELS[@]}" 3>&1 1>&2 2>&3 3>&1)" ; }[41m |
52 | + |
53 | + |
54 | user_and_password() { |
55 | name=$(dialog --inputbox " Please enter a name for the user account: " 10 60 3>&1 1>&2 2>&3 3>&1) || exit 1 |
56 | while ! echo "$name" | grep -q "^[a-z_][a-z0-9_-]*$"; do |
57 | @@ -76,7 +89,8 @@ user_and_password() { |
58 | done ; } |
59 | |
60 | root_user_password(){ |
61 | - pass3=$(dialog --no-cancel --passwordbox "Enter a password for the root user:" 10 60 3>&1 1>&2 2>&3 3>&1) |
62 | + dialog --colors --title "$TITLE" --yes-label ' Change Root Password ' --no-label ' Keep Current Password ' --yesno "\\nWould you like to change the root password?\\n\\nIf this is a clean install and not an addition to an existing system, it is essential that you change the root password.\\n\\nChange root password?" 12 66 3>&1 1>&2 2>&3 3>&1 || return 0 ; |
63 | + pass3=$(dialog --no-cancel --passwordbox "Enter a password for the root user:" 10 60 3>&1 1>&2 2>&3 3>&1) |
64 | pass4=$(dialog --no-cancel --passwordbox "Retype the password." 10 60 3>&1 1>&2 2>&3 3>&1) |
65 | while ! [ "$pass3" = "$pass4" ]; do |
66 | unset pass2 |
67 | @@ -89,7 +103,7 @@ usercheck() { \ |
68 | dialog --colors --title "WARNING!" --yes-label " CONTINUE " --no-label " RETURN " --yesno "\nThe user '$name' already exists on this system. AutoLinux can install for this user, but will overwrite any existing configuration files existing on \\nthis users account. \\n\\nHowever, it will not overwrite any other user files, documents, videos, or personal files of any sorts.\\n\\nIrrespective, only click <CONTINUE> if you are certain you have backed up any wanted system 'config' files.\\n\\nThe users password will also be changed to the one you just provided." 17 85 ; } |
69 | |
70 | preinstall() { \ |
71 | - dialog --title " The calm before the STORM!" --yes-label "CONTINUE" --no-label " EXIT " --yesno "\\nThe rest of the proccess is automated and might take a while, depending on your connection. \\n\\nSo sit back, relax and please do not stop the process if it seems stuck.\\n\\nSome packages just take longer to compile than others.\\n\\n\\n Ready when you are?" 16 60 ; } |
72 | + dialog --title " The calm before the STORM!" --yes-label "CONTINUE" --no-label " EXIT " --yesno "\\nThe rest of the proccess is automated and might take a while, depending on your connection. \\n\\nSo sit back, relax and please do not stop the process if it seems stuck.\\n\\nSome packages just take longer to compile than others.\\n\\n\\nReady when you are?" 16 60 ; } |
73 | |
74 | |
75 | adduserandpass() { \ |
76 | @@ -102,6 +116,7 @@ adduserandpass() { \ |
77 | |
78 | setrootpass(){ |
79 | dialog --infobox " Changing password for root user..." 4 50 |
80 | + [ -z "$pass3" ] && pass3="autolinux" ; |
81 | echo "root:$pass3" | chpasswd >/dev/null 2>&1 |
82 | unset pass3 pass4 ; } |
83 | |