| Hash | Commit message | Author | Date | Files | + | - |
1 | commit 03f20cba15604fdf84af4e368ea34f1acc08b178 |
2 | Author: nvx1 <[email protected]> |
3 | Date: Tue Mar 29 01:24:42 2022 +0200 |
4 | |
5 | Update. |
6 | --- |
7 | AutoInstall | 70 ++++++++++++++++++++++++++++++++++++++++--------------------- |
8 | 1 file changed, 46 insertions(+), 24 deletions(-) |
9 | |
10 | diff --git a/AutoInstall b/AutoInstall |
11 | index 9bdc1d4..e09fc81 100755 |
12 | --- a/AutoInstall |
13 | +++ b/AutoInstall |
14 | @@ -44,11 +44,16 @@ rmdblck="$([ -f /var/lib/pacman/db.lck ] && rm -rf /var/lib/pacman/db.lck)" |
15 | |
16 | |
17 | KERNELS=( |
18 | - '1.' 'linux' |
19 | - '2.' 'linux-lts' |
20 | - '3.' 'linux-hardened' |
21 | - '4.' 'linux-zen') |
22 | + '1' 'linux ' |
23 | + '2' 'linux-lts ' |
24 | + '3' 'linux-hardened ' |
25 | + '4' 'linux-zen ') |
26 | |
27 | +EDITIONS=([41m |
28 | + '1' 'DWM ' |
29 | + '2' 'Plasma ' |
30 | + '3' 'Server Install (Bare ArchLinux) ') |
31 | +[41m |
32 | |
33 | installpkg(){ pacman --noconfirm --needed -S "$*" >/dev/null 2>&1 ; } |
34 | |
35 | @@ -66,13 +71,13 @@ initmsg1(){ \ |
36 | dialog --title " Welcome to Automate OS! " --msgbox "\\n Welcome, and thank you for choosing AutoLinux!\\n\\n This script will now install the AutoLinux edition of your choice.\\n" 9 80 ; } |
37 | |
38 | whichedition(){ |
39 | - edition="$(dialog --colors --menu " Please Select the AutoLinux Edition to Install :" 12 55 1 1 "DWM " 2 "Plasma " 3 "Bare ArchLinux " 3>&1 1>&2 2>&3 3>&1)" ; } |
40 | + edition="$(dialog --title "$TITLE" --colors --menu " Please Select the AutoLinux Edition to Install :" 14 56 5 "${EDITIONS[@]}" 3>&1 1>&2 2>&3 3>&1)" ; } |
41 | |
42 | initmsg2(){ |
43 | 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 ; } |
44 | |
45 | selKernel(){ |
46 | - 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)" ; } |
47 | + kernel="$(dialog --stdout --colors --title "Kernel Selection" --menu " Please choose your kernel:\\n (If unsure, just select the default linux kernel)" 14 56 6 "${KERNELS[@]}" 3>&1 1>&2 2>&3 3>&1)" ; }[41m |
48 | |
49 | |
50 | user_and_password() { |
51 | @@ -103,7 +108,7 @@ usercheck() { \ |
52 | 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 ; } |
53 | |
54 | preinstall() { \ |
55 | - 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 ; } |
56 | + 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.\\nSome packages just take longer to compile than others.\\n\\n\\nReady when you are?" 14 82 ; } |
57 | |
58 | |
59 | adduserandpass() { \ |
60 | @@ -121,7 +126,7 @@ setrootpass(){ |
61 | unset pass3 pass4 ; } |
62 | |
63 | bootload(){ |
64 | - dialog --colors --title " Clean Install or Existing System? " --yes-label " Install GRUB! " --no-label " I have a bootloader. " --yesno "\\n Would you like AutoLinux to install the GRUB bootloader? \\n\\n If it is your first time installing an OS and you have not yet installed or \n configured a bootloader, then selecting 'yes' would be a required for the \n system to function or boot." 11 100 && |
65 | + dialog --colors --title " Clean Install or Existing System? " --yes-label " Install GRUB! " --no-label " I have a bootloader. " --yesno "\\n Would you like AutoLinux to install the GRUB bootloader? \\n\\n If it is your first time installing an OS and you have not yet installed or \n configured a bootloader, then selecting 'yes' would be a required for the \n system to function or boot." 11 82 && |
66 | loader="$?" ; } |
67 | |
68 | addmirrors(){ |
69 | @@ -140,7 +145,7 @@ refreshkeys() { \ |
70 | |
71 | yes|pacman-key --recv-key 3E550ACE369CFA1BEE0ABA6E8C85178C555A3C06 --keyserver keyserver.ubuntu.com >/dev/null 2>&1 |
72 | yes|pacman-key --lsign-key 3E550ACE369CFA1BEE0ABA6E8C85178C555A3C06 >/dev/null 2>&1 |
73 | - yes|pacman -U 'https://gitlab.com/qyp/concise/-/raw/master/x86_64/concise-keyring-1.0.2-1-any.pkg.tar.zst' >/dev/null 2>&1 |
74 | + yes|pacman -U 'https://gitlab.com/qyp/concise/-/raw/master/x86_64/concise-keyring-10.2-1-any.pkg.tar.zst' >/dev/null 2>&1 |
75 | |
76 | cat /etc/pacman.conf|grep -q "^\[concise\]"|| cat << EOF >>/etc/pacman.conf |
77 | |
78 | @@ -316,10 +321,10 @@ system_config(){ \ |
79 | echo -e "\nLANG=en_ZA.UTF-8\nLANG=en_US.UTF-8" > /etc/locale.conf && |
80 | [ "$(cat /etc/locale.conf|grep "$area"|wc -l)" -eq "0" ] && |
81 | echo "LANG=en_"$area".UTF-8" >>/etc/locale.conf ; locale-gen &>/dev/null |
82 | - echo -e "127.0.0.1 localhost\n::1 localhost\n127.0.1.1 $hostname.localhost $hostname" >/etc/hosts |
83 | - [ $edition = "2" ] && systemctl enable sddm.service >/dev/null 2>&1 ; systemctl enable NetworkManager.service >/dev/null 2>&1 ; |
84 | + echo -e "127.0.0.1 localhost\n::1 localhost\n127.0.11 $hostname.localhost $hostname" >/etc/hosts |
85 | + [ $edition = '2' ] && systemctl enable sddm.service >/dev/null 2>&1 ; systemctl enable NetworkManager.service >/dev/null 2>&1 ;[41m |
86 | [ $edition = '1' ] || [ $edition = '2' ] && systemctl enable bluetooth-autoconnect.service >/dev/null 2>&1 ; |
87 | - systemctl enable bluetooth.service >/dev/null 2>&1 ; [ $edition = "1" ] && |
88 | + systemctl enable bluetooth.service >/dev/null 2>&1 ; [ $edition = '1' ] &&[41m |
89 | systemctl enable mpd.service >/dev/null 2>&1 ; echo "$hostname" > /etc/hostname |
90 | rm -rf /tmp/pulse* ~/.pulse* ~/.config/pulse /home/$name/.pulse* /home/$name/.config/pulse* ; } |
91 | |
92 | @@ -340,9 +345,9 @@ grub(){ \ |
93 | grubtheme(){ \ |
94 | dialog --infobox "Setting Grub theme..." 4 30 |
95 | sleep 1 && mkdir -p /boot/grub/themes/AutoLinux && |
96 | - cp /home/$name/.local/share/wallpapers/0.jpg /boot/grub/themes/AutoLinux/wp1.jpg >/dev/null 2>&1 |
97 | - sed -i 's/#GRUB_BACKGROUND.*/GRUB_BACKGROUND="\/boot\/grub\/themes\/AutoLinux\/wp1.jpg"/g' /etc/default/grub >/dev/null 2>&1 |
98 | - sed -i 's/GRUB_BACKGROUND.*/GRUB_BACKGROUND="\/boot\/grub\/themes\/AutoLinux\/wp1.jpg"/g' /etc/default/grub >/dev/null 2>&1 |
99 | + cp /home/$name/.local/share/wallpapers/0.jpg /boot/grub/themes/AutoLinux/wp1jpg >/dev/null 2>&1[41m |
100 | + sed -i 's/#GRUB_BACKGROUND.*/GRUB_BACKGROUND="\/boot\/grub\/themes\/AutoLinux\/wp1jpg"/g' /etc/default/grub >/dev/null 2>&1 |
101 | + sed -i 's/GRUB_BACKGROUND.*/GRUB_BACKGROUND="\/boot\/grub\/themes\/AutoLinux\/wp1jpg"/g' /etc/default/grub >/dev/null 2>&1 |
102 | sed -i 's/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=10/g' /etc/default/grub >/dev/null 2>&1 |
103 | sed -i 's/#GRUB_GFXMODE.*/GRUB_GFXMODE=1920x1080x32/g' /etc/default/grub >/dev/null 2>&1 |
104 | } |
105 | @@ -350,8 +355,8 @@ grubtheme(){ \ |
106 | |
107 | finalize(){ \ |
108 | dialog --infobox "Preparing welcome message..." 4 50 |
109 | - [ $edition = "1" ] && dialog --title "Time to Celebrate!" --msgbox "\\nInstallation completed successfully! Provided there were no hidden errors, all the programs and configuration files should be in place.\\n\\nTo run the new graphical environment, log out and log back in as your new user, then run the command 'startx' to start the graphical environment \\n(it will start automatically in tty1).\\n\\n Enjoy AutoLinux! - dqYpb" 13 80 ; |
110 | - [ $edition = "2" ] && sed -i 's/Name=.*$/Name=AutoLinux (Plasma)/g' /usr/share/xsessions/plasma.desktop && cp -r /home/$name/.local/bin/* /usr/local/bin/ && |
111 | + [ $edition = '1' ] && dialog --title "Time to Celebrate!" --msgbox "\\nInstallation completed successfully! Provided there were no hidden errors, all the programs and configuration files should be in place.\\n\\nTo run the new graphical environment, log out and log back in as your new user, then run the command 'startx' to start the graphical environment \\n(it will start automatically in tty1).\\n\\n Enjoy AutoLinux! - dqYpb" 13 80 ;[41m |
112 | + [ $edition = '2' ] && sed -i 's/Name=.*$/Name=AutoLinux (Plasma)/g' /usr/share/xsessions/plasma.desktop && cp -r /home/$name/.local/bin/* /usr/local/bin/ && |
113 | dialog --title "Time to Celebrate" --msgbox "\\n The AutoLinux installation process has completed successfully\!\\n\\n\\n Provided there were no hidden errors, all the programs and configuration files should be in place.\\n\\nautolinux-Plasma will automatically start up in the login manager the next time you reboot your computer.\\n\\n\\n\\n Enjoy AutoLinux! - dqYpb" 17 110 ; } |
114 | |
115 | |
116 | @@ -379,6 +384,8 @@ user_and_password || err "User exited." |
117 | |
118 | root_user_password || err "User exited." |
119 | |
120 | +selKernel || err "User exited." |
121 | + |
122 | usercheck || err "User exited." |
123 | |
124 | bootload |
125 | @@ -388,7 +395,7 @@ preinstall || err "User exited." |
126 | refreshkeys || err "Automatically refreshing Arch keyring. Consider doing so manually." |
127 | |
128 | for x in curl ca-certificates base-devel archlinux-keyring hwinfo neofetch rsync git ntp zsh ; do |
129 | - dialog --title "AutoLinux Installation" --infobox "Installing '$x' which is required to install and configure other programs." 5 70 |
130 | + dialog --title "$TITLE" --infobox "Installing '$x' which is required to install and configure other programs." 5 70 |
131 | installpkg "$x" |
132 | done |
133 | |
134 | @@ -411,16 +418,31 @@ sudoers "%wheel ALL=(ALL) NOPASSWD: ALL #AutoLinux" |
135 | archlinuxinstall yay-bin |
136 | |
137 | |
138 | -[ $edition = "1" ] && pkgsfile="https://gitlab.com/qYp/autolinux/-/raw/editions/dwm.csv" && gitbranch="dwm" |
139 | +[ $edition = '1' ] && pkgsfile="https://gitlab.com/qYp/autolinux/-/raw/editions/dwm.csv" && gitbranch="dwm" |
140 | + |
141 | +[ $edition = '2' ] && pkgsfile="https://gitlab.com/qYp/autolinux/-/raw/editions/plasma.csv" && gitbranch="plasma" |
142 | + |
143 | +[ $edition = '3' ] && pkgsfile="https://gitlab.com/qYp/autolinux/-/raw/editions/bare.csv" && gitbranch="bare" |
144 | + |
145 | |
146 | -[ $edition = "2" ] && pkgsfile="https://gitlab.com/qYp/autolinux/-/raw/editions/plasma.csv" && gitbranch="plasma" |
147 | +[ $kernel = '1' ] && kernelChoice='linux' |
148 | +[41m |
149 | +[ $kernel = '2' ] && kernelChoice='linux-lts' |
150 | |
151 | -[ $edition = "3" ] && pkgsfile="https://gitlab.com/qYp/autolinux/-/raw/editions/bare.csv" && gitbranch="bare" |
152 | +[ $kernel = '3' ] && kernelChoice='linux-hardened' |
153 | + |
154 | +[ $kernel = '4' ] && kernelChoice='linux-zen' |
155 | + |
156 | + |
157 | +for x in $kernelChoice ; do |
158 | + dialog --title "$TITLE" --infobox "Installing the "$x" kernel..." 5 70 && installpkg "$x" |
159 | + dialog --title "$TITLE" --infobox "Installing the "$x"-headers package..." 5 70 && installpkg "$x"-headers |
160 | +done |
161 | |
162 | |
163 | installationloop ; cpudrivers ; gpudrivers |
164 | |
165 | -[ $edition = "1" ] && xftlib |
166 | +[ $edition = '1' ] && xftlib |
167 | |
168 | systembeepoff ; promptfix |
169 | |
170 | @@ -439,10 +461,10 @@ mkdir -p /etc/X11/xinit/xinitrc.d >/dev/null 2>&1 && |
171 | ln -s /home/$name/{.config,.local/} /root >/dev/null 2>&1 && |
172 | cp /home/$name/.config/shell/profile /root/.zprofile >/dev/null 2>&1 |
173 | |
174 | -[ $edition = "1" ] && cp /home/$name/.local/src/dwm/dwm /usr/bin/dwm && |
175 | +[ $edition = '1' ] && cp /home/$name/.local/src/dwm/dwm /usr/bin/dwm &&[41m |
176 | cp /home/$name/.local/src/dwm/dwm /usr/bin/AutoLinux-dwm |
177 | |
178 | -[ $edition = "2" ] && pacman -S plasma-desktop plasma-meta --noconfirm >/dev/null 2>&1 && |
179 | +[ $edition = '2' ] && pacman -S plasma-desktop plasma-meta --noconfirm >/dev/null 2>&1 &&[41m |
180 | cp /usr/bin/startplasma-x11 /usr/bin/AutoLinux-plasma >/dev/null 2>&1 |
181 | |
182 | grep -q "OTHER_OPTS='-a pulseaudio -m alsa_seq -r 48000'" /etc/conf.d/fluidsynth || |