1
0
mirror of https://gitlab.com/JKANetwork/JKArch.git synced 2026-02-22 21:13:44 +01:00

Fix udisks deletion and start new install script (Different)

This commit is contained in:
2017-01-22 21:16:33 +01:00
parent 14902804de
commit 23c8b138cf
3 changed files with 75 additions and 343 deletions

View File

@@ -27,7 +27,7 @@ evince ristretto librsvg gnome-calculator gnome-disk-utility file-roller lrzip p
cups cups-filters cups-pk-helper system-config-printer gtk3-print-backends hplip foomatic-db-engine foomatic-db foomatic-db-ppds xsane bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry \ cups cups-filters cups-pk-helper system-config-printer gtk3-print-backends hplip foomatic-db-engine foomatic-db foomatic-db-ppds xsane bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry \
dropbox megasync geary k3b jre8-openjdk wine-staging wine_gecko winetricks lib32-libpng lib32-libldap lib32-gnutls lib32-mpg123 lib32-libpulse lib32-ncurses lib32-openal lib32-alsa-lib lib32-gst-plugins-base-libs bleachbit \ dropbox megasync geary k3b jre8-openjdk wine-staging wine_gecko winetricks lib32-libpng lib32-libldap lib32-gnutls lib32-mpg123 lib32-libpulse lib32-ncurses lib32-openal lib32-alsa-lib lib32-gst-plugins-base-libs bleachbit \
sublime-text-dev sublime-text visual-studio-code jdk8-openjdk eclipse-java monodevelop brackets atom-editor-bin gdevelop poedit arduino \ sublime-text-dev sublime-text visual-studio-code jdk8-openjdk eclipse-java monodevelop brackets atom-editor-bin gdevelop poedit arduino \
xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-afc gvfs-smb udisks networkmanager network-manager-applet gnome-keyring xdialog \ xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-afc gvfs-smb udisks2 networkmanager network-manager-applet gnome-keyring xdialog \
jkarch-appearance lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs xfce4-power-manager \ jkarch-appearance lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs xfce4-power-manager \
lxappearance lxappearance-obconf lxde-common lxinput lxpanel lxrandr lxsession lxtask lxterminal openbox pcmanfm xfce4-notifyd \ lxappearance lxappearance-obconf lxde-common lxinput lxpanel lxrandr lxsession lxtask lxterminal openbox pcmanfm xfce4-notifyd \
xfce4 cinnamon gnome-extra gnome mate-extra mate gtk-engine-murrine plasma gtk-engine-aurora faenza-icon-theme \ xfce4 cinnamon gnome-extra gnome mate-extra mate gtk-engine-murrine plasma gtk-engine-aurora faenza-icon-theme \

View File

@@ -2,7 +2,8 @@
## Note: Some text editors in some lines its wrong the "markup color" because much '"'($) things. ## Note: Some text editors in some lines its wrong the "markup color" because much '"'($) things.
sclang=$1 sclang=$1
source translations.sh source translations.sh
dialog --title "No ejecutar" --msgbox "No ejecutar esta version, esta siendo editada aun" 15 60
exit
#Try to disable ctrl+C (Disabled in dev) #Try to disable ctrl+C (Disabled in dev)
#trap '' INT #trap '' INT
#No black screensaver #No black screensaver
@@ -10,12 +11,6 @@ setterm -blank 0 -powerdown 0 -powersave off
#Fix para caracteres de dialog, ñ o tildes #Fix para caracteres de dialog, ñ o tildes
export NCURSES_NO_UTF8_ACS=1 export NCURSES_NO_UTF8_ACS=1
##Offline var
isoffline=0
if [[ ! -z "$2" ]];then
isoffline="$2" #If its offline will be 1
fi
function pause { function pause {
echo "$(T "Press enter to continue...")" echo "$(T "Press enter to continue...")"
read read
@@ -289,7 +284,6 @@ function particiones {
clear clear
if [[ $tabletype = "gpt" ]];then if [[ $tabletype = "gpt" ]];then
# Seleccion de particion EFI # Seleccion de particion EFI
@@ -373,199 +367,34 @@ function userpass {
esac esac
} }
##User graphics select
function graficos {
optgrafica=`dialog --stdout --nocancel --scrollbar --menu "$(T "What is your graphics card brand?")" 0 0 6 1 "Nvidia" 2 "AMD/ATI" 3 "Intel" 4 "VIA" 5 "Estoy usando VirtualBox" 6 "Estoy usando VMWare" 7 "No se la marca/Otra (Se instalaran todos los drivers graficos estandar)"`
case $optgrafica in
1) allpackages=$allpackages" xf86-video-nouveau libva-vdpau-driver mesa-vdpau";;
2) allpackages=$allpackages" xf86-video-ati xf86-video-amdgpu libva-mesa-driver libva-vdpau-driver mesa-vdpau";;
3) allpackages=$allpackages" xf86-video-intel libva-intel-driver libvdpau-va-gl";;
4) allpackages=$allpackages" xf86-video-openchrome";;
5) allpackages=$allpackages" virtualbox-guest-utils virtualbox-guest-modules-arch";;
6) allpackages=$allpackages" xf86-video-vmware xf86-input-vmmouse open-vm-tools";;
7) allpackages=$allpackages" "$(execl chroot pacman -Ssq xf86-video-*);;
esac
#Instalar siempre la estandar, por se acaso
allpackages=$allpackages" xf86-video-vesa mesa-libgl"
}
##Interactive function for make user select programs ##Interactive function for make user select programs
function programasguiuser { function programasguiuser {
clear clear
# Default selected apps optbr=`dialog --stdout --nocancel --menu "¿Que navegador web utilizas?" 0 0 4 1 "Firefox" 2 "Chromium" 3 "Opera"`;
opt1="1 6" case $optbr in
opt2="1 5" 1) packages="$packages firefox";;
opt3="1" 2) packages="$packages chromium";;
opt5="1 2" 3) packages="$packages opera";;
opt6="1 2 3 4 5 6" esac
opt7="1 2 5" # Standard packages
mostrardialog "Leer" "Ahora se le presenta la opcion de elegir que programas quieres que sean instalados, cosa que recomendamos, aunque, dejamos tambien una opcion rapida, que instalara lo basico y recomendado desde nuestro punto de vista." packages="$packages flashplugin evince ristretto librsvg gnome-calculator gnome-disk-utility file-roller lrzip p7zip unace unrar tumbler poppler-glib ffmpegthumbnailer libgsf notepadqq leafpad libreoffice-fresh vlc qt4 noto-fonts noto-fonts-cjk noto-fonts-emoji ttf-dejavu ttf-liberation ttf-ms-fonts";;&
tipoinstall=`dialog --stdout --nocancel --menu "¿Elegir los programas que quiere?" 0 0 5 1 "Si, elegir (Muy recomendado)" 2 "No, instalar preseleccion de programas (Opcion rapida)" 3 "No, no instalar ninguno (Solo tendras el entorno y poco más)"` packages="$packages foomatic-db-engine foomatic-db foomatic-db-ppds hplip xsane cups cups-filters cups-pk-helper system-config-printer gtk3-print-backends"
case $tipoinstall in
1) confirm=`yesnobox "Habilitar soporte bluetooth?"`
until [[ $surep -eq 1 ]] if [[ $confirm == "Y" ]];then
do packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry "
optprogramas=`dialog --stdout --nocancel --scrollbar --menu "Categorías" 0 0 11 1 "Navegadores web ($(echo $opt1 | wc -w) seleccionados)" 2 "Editores de texto y Office ($(echo $opt2 | wc -w) seleccionados)" 3 "Audio y Video ($(echo $opt3 | wc -w) seleccionados)" 4 "Editores de imagen ($(echo $opt4 | wc -w) seleccionado)" 5 "Fuentes/Tipos de letra ($(echo $opt5 | wc -w) seleccionado)" 6 "Utilidades basicas ($(echo $opt6 | wc -w) seleccionado)" 7 "Soportes (Impresoras,Bluetooth...) ($(echo $opt7 | wc -w) seleccionado)" 8 "Utilidades varias ($(echo $opt8 | wc -w) seleccionado)" 9 "Programacion (IDEs) ($(echo $opt9 | wc -w) seleccionado)" A "Programacion (programas) ($(echo $optA | wc -w) seleccionado)" I "Instalar"` fi
#Menu con cada una de las categorias confirm=`yesnobox "Habilitar compatibilidad programas Windows (Usando wine)?"`
case $optprogramas in if [[ $confirm == "Y" ]];then
# La variable optstate "$optX" Y es una funcion que devuelve on o off, para mostrar la ultima seleccion bien packages="$packages wine-staging wine_gecko winetricks"
1) opt1=`dialog --stdout --checklist "Navegadores web" 0 0 6 1 "Firefox" $(optstate "$opt1" 1) 2 "Chrome" $(optstate "$opt1" 2) 3 "Chromium" $(optstate "$opt1" 3) 4 "Opera" $(optstate "$opt1" 4) 5 "Otter Browser" $(optstate "$opt1" 5) 6 "Soporte Flash Player" $(optstate "$opt1" 6)`;; packages="$packages lib32-libpng lib32-libldap lib32-gnutls lib32-mpg123 lib32-libpulse lib32-ncurses lib32-openal lib32-alsa-lib lib32-gst-plugins-base-libs" #Some 32bit libs for winearch 32 work better
2) opt2=`dialog --stdout --scrollbar --checklist "Editores de texto y Office" 0 0 7 1 "Libreoffice (Recomendado)" $(optstate "$opt2" 1) 2 "AbiWord" $(optstate "$opt2" 2) 3 "Gnumeric" $(optstate "$opt2" 3) 4 "WPS Office" $(optstate "$opt2" 4) 5 "leafpad (Bloc de notas)" $(optstate "$opt2" 5) 6 "gedit" $(optstate "$opt2" 6) 7 "notepadqq" $(optstate "$opt2" 7)`;; inswine=1;;&
3) opt3=`dialog --stdout --checklist "Audio y Video" 0 0 6 1 "VLC (Recomendado)" $(optstate "$opt3" 1) 2 "SMPlayer" $(optstate "$opt3" 2) 3 "Totem" $(optstate "$opt3" 3) 4 "Clementine" $(optstate "$opt3" 4)`;; fi
4) opt4=`dialog --stdout --checklist "Imagen" 0 0 6 1 "GIMP" $(optstate "$opt4" 1) 2 "Inkscape" $(optstate "$opt4" 2) 3 "Pinta" $(optstate "$opt4" 3) 4 "Krita (Dibujo)" $(optstate "$opt4" 4)`;;
5) opt5=`dialog --stdout --checklist "Fuentes/Tipos de letra" 0 0 6 1 "Fuentes basicas (Noto,devaju,liberation..)" $(optstate "$opt5" 1) 2 "Microsoft Fonts" $(optstate "$opt5" 2) 3 "Recopilatorio de fuentes de Google (mas de 300)" $(optstate "$opt5" 3)`;;
6) opt6=`dialog --stdout --checklist "Recomendado pulsar todos \nUtilidades basicas" 0 0 6 1 "Evince (Lector PDF)" $(optstate "$opt6" 1) 2 "Ristretto (imagenes jpg,png...)" $(optstate "$opt6" 2) 3 "Cacluladora" $(optstate "$opt6" 3) 4 "Montar ISO/IMG" $(optstate "$opt6" 4) 5 "(Des)compresor de archivos (ZIP,RAR...)" $(optstate "$opt6" 5) 6 "Miniaturas mejoradas de ficheros" $(optstate "$opt6" 6)`;;
7) opt7=`dialog --stdout --checklist "Soportes (Impresoras,Bluetooth...)" 0 0 6 1 "CUPS (Soporte impresoras)" $(optstate "$opt7" 1) 2 "Drivers comunes impresoras" $(optstate "$opt7" 2) 3 "HPLIP (Soporte impresoras HP)" $(optstate "$opt7" 3) 4 "Bluetooth" $(optstate "$opt7" 4) 5 "Escaner (Programa)" $(optstate "$opt7" 5)`;;
8) opt8=`dialog --stdout --scrollbar --checklist "Utilidades varias" 0 0 8 1 "Dropbox" $(optstate "$opt8" 1) 2 "MEGA" $(optstate "$opt8" 2) 3 "Visor de correo Evolution" $(optstate "$opt8" 3) 4 "Grabador de discos (k3b)" $(optstate "$opt8" 4) 5 "Java (jre8)" $(optstate "$opt8" 5) 6 "Wine ('Emulador' de programas de Windows)" $(optstate "$opt8" 6) 7 "BleachBit (Limpiador de disco duro)" $(optstate "$opt8" 7)`;;
9) opt9=`dialog --stdout --scrollbar --checklist "Programacion (IDEs)" 0 0 8 1 "Sublime Text 3" $(optstate "$opt9" 1) 2 "Sublime Text 2" $(optstate "$opt9" 2) 3 "Visual Studio Code" $(optstate "$opt9" 3) 4 "Eclipse" $(optstate "$opt9" 4) 5 "Monodevelop" $(optstate "$opt9" 5) 6 "Brackets" $(optstate "$opt9" 6) 7 "Atom" $(optstate "$opt9" 7) 8 "Gamedevelop" $(optstate "$opt9" 8) 9 "Poedit (gettext)" $(optstate "$opt9" 9) A "Arduino IDE" $(optstate "$opt9" A)`;;
"A") optA=`dialog --stdout --checklist "Programacion (Programas)" 0 0 6 1 "base-devel (standard utils like GCC)" $(optstate "$optA" 1) 2 "Java (OpenJDK 8)" $(optstate "$optA" 2)`;;
"I")
#Instalar
surep=1
break;;
esac
done
;;
2) mostrardialog "Programas predeterminados" "Se instalaran los programas predeterminados";;
3) mostrardialog "Ningun programa" "No se instalara ningun programa opcional."
nooptprogs="1" # Not install anything
;;
esac
if [[ $nooptprogs != "1" ]];then
packages="" #Erase var before
case $opt1 in
*1*) packages="firefox";;&
*2*) packages="$packages google-chrome";;&
*3*) packages="$packages chromium";;&
*4*) packages="$packages opera";;&
*5*) packages="$packages otter-browser";;&
*6*) packages="$packages flashplugin";;&
esac
case $opt2 in
*1*) packages="$packages libreoffice-fresh";;&
*2*) packages="$packages abiword";;&
*3*) packages="$packages gnumeric";;&
*4*) packages="$packages wps-office";;&
*5*) packages="$packages leafpad";;&
*6*) packages="$packages gedit";;&
*7*) packages="$packages notepadqq";;&
esac
case $opt3 in
*1*) packages="$packages vlc qt4";;&
*2*) packages="$packages smplayer";;&
*3*) packages="$packages totem";;&
*4*) packages="$packages clementine";;&
esac
case $opt4 in
*1*) packages="$packages gimp";;&
*2*) packages="$packages inkscape";;&
*3*) packages="$packages pinta";;&
*4*) packages="$packages krita";;&
esac
case $opt5 in
*1*) packages="$packages noto-fonts noto-fonts-cjk noto-fonts-emoji ttf-dejavu ttf-liberation";;&
*2*) packages="$packages ttf-ms-fonts";;&
*3*) packages="$packages ttf-google-fonts-git"
;;&
esac
case $opt6 in
*1*) packages="$packages evince";;&
*2*) packages="$packages ristretto librsvg";;&
*3*) packages="$packages gnome-calculator";;&
*4*) packages="$packages gnome-disk-utility";;&
*5*) packages="$packages file-roller lrzip p7zip unace unrar";;&
*6*) packages="$packages tumbler poppler-glib ffmpegthumbnailer libgsf";;&
esac
case $opt7 in
*1*) cups=1;;&
*2*) packages="$packages foomatic-db-engine foomatic-db foomatic-db-ppds"
cups=1
;;&
*3*) packages="$packages hplip"
cups=1
;;&
*4*) packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry";;&
*5*) packages="$packages xsane"
cups=1
;;&
esac
case $opt8 in
*1*) packages="$packages dropbox";;&
*2*) packages="$packages megasync";;&
*3*) packages="$packages geary";;&
*4*) packages="$packages k3b";;&
*5*) packages="$packages jre8-openjdk";;&
*6*) packages="$packages wine-staging wine_gecko winetricks"
packages="$packages lib32-libpng lib32-libldap lib32-gnutls lib32-mpg123 lib32-libpulse lib32-ncurses lib32-openal lib32-alsa-lib lib32-gst-plugins-base-libs" #Some 32bit libs for winearch 32 work better
inswine=1;;&
*7*) packages="$packages bleachbit";;&
esac
case $opt9 in
*1*) packages="$packages sublime-text-dev";;&
*2*) packages="$packages sublime-text";;&
*3*) packages="$packages visual-studio-code";;&
*4*) packages="$packages jdk8-openjdk eclipse-java";;&
*5*) packages="$packages monodevelop";;&
*6*) packages="$packages brackets";;&
*7*) packages="$packages atom-editor-bin";;&
*8*) packages="$packages gdevelop";;&
*9*) packages="$packages poedit";;&
*A*) packages="$packages arduino";;&
esac
case $optA in
*1*) packages="$packages base-devel";;&
*2*) packages="$packages jdk8-openjdk";;&
esac
allpackages=$allpackages" "$packages allpackages=$allpackages" "$packages
packages="" packages=""
#Añadir soporte cups basico si se selecciona cualquier opcion de impresoras
if [[ $cups = "1" ]];then
allpackages=$allpackages" cups cups-filters cups-pk-helper system-config-printer gtk3-print-backends"
fi
fi
}
##Function to select environment
function entorno {
clear
optentorno=`dialog --stdout --nocancel --menu "$(T "Select your desktop enviroment")" 0 0 5 1 "LXDE (Muy ligero)" 2 "XFCE (Ligero)" 3 "Cinnamon (Facil para antiguos usuarios de Windows)" 4 "Gnome (Complejo, pero practico)" 5 "MATE (Tradicional)" 6 "Plasma/KDE (Pesado aunque bonito) " 7 "No instalar entorno de escritorio"`
case $optentorno in
1)
allpackages=$allpackages" lxappearance lxappearance-obconf lxde-common lxinput lxpanel lxrandr lxsession lxtask lxterminal openbox pcmanfm xfce4-notifyd gtk-engine-aurora faenza-icon-theme"
#Themes: gtk-engine-aurora faenza-icon-theme
;;
2) allpackages=$allpackages" xfce4 faenza-icon-theme";;
3) allpackages=$allpackages" cinnamon";;
4)
optgnome=`dialog --stdout --nocancel --menu "¿Gnome base o gnome con sus extras?" 0 0 5 1 "Gnome base" 2 "Gnome+extras"`
case $optgnome in
1) allpackages=$allpackages" gnome";;
2) allpackages=$allpackages" gnome gnome-extra";;
esac
#In installconf, it has to remove gdm
;;
5)
optmate=`dialog --stdout --nocancel --menu "¿MATE base o MATE con sus extras?" 0 0 5 1 "MATE base" 2 "MATE+extras"`
case $optmate in
1) allpackages=$allpackages" mate gtk-engine-murrine mate-media";;
2) allpackages=$allpackages" mate mate-extra gtk-engine-murrine";;
esac
;;
6)
allpackages=$allpackages" plasma"
#Remove plasma-mediacenter ksshaskpass after, in installconf
;;
esac
# Basic programs (Xorg) and audio support if there is selected any
if [[ $optentorno != 7 ]];then
#Gestor de energia xfce4-power-manager
allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager lxtask"
fi fi
} }
# End of functions that are user interactive for configuring system # End of functions that are user interactive for configuring system
@@ -594,23 +423,16 @@ function installconf {
fi fi
# Download or install base system. # Download or install base system.
if [[ $isoffline = "0" ]];then wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/pacman.conf -O pacman.conf
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/pacman.conf -O pacman.conf isanetworkerror # Comprueba si hubo un error de descarga
isanetworkerror # Comprueba si hubo un error de descarga tput setaf 2 ; echo "$(T "Optimizing download")" ; tput setaf 9
tput setaf 2 ; echo "$(T "Optimizing download")" ; tput setaf 9 execl reflector --verbose -l 6 --sort rate --save /etc/pacman.d/mirrorlist
execl reflector --verbose -l 6 --sort rate --save /etc/pacman.d/mirrorlist tput setaf 2 ; echo "$(T "Downloading")" ; tput setaf 9
tput setaf 2 ; echo "$(T "Downloading")" ; tput setaf 9 # Reflector and rsync is for updating mirrorlist #
# Reflector and rsync is for updating mirrorlist # execl pacman -Sy archlinux-keyring --noconfirm #Keyring for avoid fail sig of some packages
execl pacman -Sy archlinux-keyring --noconfirm #Keyring for avoid fail sig of some packages execl pacstrap -C pacman.conf /mnt/ base jkarch-mirrorlist reflector rsync dosfstools ntfs-3g btrfs-progs exfat-utils #Install base and disk format drivers
execl pacstrap -C pacman.conf /mnt/ base jkarch-mirrorlist reflector rsync dosfstools ntfs-3g btrfs-progs exfat-utils #Install base and disk format drivers pacmanerror
pacmanerror mv pacman.conf /mnt/etc/pacman.conf
mv pacman.conf /mnt/etc/pacman.conf
fi
if [[ $isoffline = "1" ]];then
tput setaf 2 ; echo "$(T "Installing packages")..." ; tput setaf 9
execl pacstrap -C pacman-offline.conf /mnt/ base jkarch-mirrorlist rsync dosfstools ntfs-3g btrfs-progs exfat-utils #Install base and disk format drivers
mv pacman-offline.conf /mnt/etc/pacman.conf #Move pacman.conf (offline) to pacman chroot location
fi
# Create fstab # Create fstab
execl genfstab -U /mnt > /mnt/etc/fstab execl genfstab -U /mnt > /mnt/etc/fstab
@@ -628,31 +450,27 @@ function installconf {
fi fi
# Create bind mountpoints for the rest of the install (Chroot) # Create bind mountpoints for the rest of the install (Chroot)
if [[ $isoffline = "0" ]];then
cp -r /etc/netctl/* /mnt/etc/netctl/ cp -r /etc/netctl/* /mnt/etc/netctl/
cp -f /etc/resolv.conf /mnt/etc/resolv.conf cp -f /etc/resolv.conf /mnt/etc/resolv.conf
fi
mount --bind /sys /mnt/sys mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev mount --bind /dev /mnt/dev
mount --bind /run /mnt/run mount --bind /run /mnt/run
# CD bind if is offline
if [[ $isoffline = "1" ]];then
mount --bind /run/archiso/bootmnt/ /mnt/run/archiso/bootmnt/
fi
# #
# Var allpackages have in this moment all the packages selected by user, and will be the install packages list for pacman # # Var allpackages have in this moment all the packages selected by user, and will be the install packages list for pacman #
# Do allpackages var contain base packages and NTP daemon (Hour sync) # Do allpackages var contain base packages and NTP daemon (Hour sync)
allpackages=$allpackages" jka-toolkit git wget netctl iw wpa_supplicant dialog sudo alsa-utils bash-completion ntp" allpackages=$allpackages" jka-toolkit git wget netctl iw wpa_supplicant dialog sudo alsa-utils bash-completion ntp"
# GUI and apps selected in "entorno{}" #Mate desktop and apps
allpackages=$allpackages" mate gtk-engine-murrine mate-media";;
allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks2 networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager lxtask"
# Before install, configure mirrorlist if its online # Before install, configure mirrorlist
if [[ $isoffline = "0" ]];then
execl chroot reflector --verbose -l 6 --sort rate --save /etc/pacman.d/mirrorlist execl chroot reflector --verbose -l 6 --sort rate --save /etc/pacman.d/mirrorlist
fi
# Here, allpackages have the user selected packages because selected before. Then, install it # Here, allpackages have the user selected packages because selected before. Then, install it
execl chroot pacman -Syu $allpackages --noconfirm --needed execl chroot pacman -Syu $allpackages --noconfirm --needed
@@ -669,54 +487,12 @@ function installconf {
test -n "$NEW_TIMEZONE" && cp -fp /mnt/usr/share/zoneinfo/"$NEW_TIMEZONE" /mnt/etc/localtime test -n "$NEW_TIMEZONE" && cp -fp /mnt/usr/share/zoneinfo/"$NEW_TIMEZONE" /mnt/etc/localtime
execl chroot hwclock --systohc --utc execl chroot hwclock --systohc --utc
execl chroot systemctl enable ntpd execl chroot systemctl enable ntpd
if [[ $isoffline = 0 ]];then #Only sync if its online echo "$(T "Syncing hour to internet in background")";
echo "$(T "Syncing hour to internet in background")"; execl chroot (ntpd -qg && && hwclock -w) &> /dev/null
execl chroot (ntpd -qg && && hwclock -w) &> /dev/null
else
echo "Clock will not be okay until restart and configure manually because you dont have net"
fi
# User and desktop skel
# User skel move
if [[ $isoffline = "1" ]];then # Is an offline installation?
tar xJf mods/skel.tar.xz -C /mnt/
else # Online
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/skel.tar.xz -O- | tar xJf - -C /mnt/ wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/skel.tar.xz -O- | tar xJf - -C /mnt/
fi wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/MATE.tar.xz -O- | tar xJf - -C /mnt/
# Themes skel before creating user and remove some progs
if [[ $optentorno = 1 ]];then #LXDE
if [[ $isoffline = "1" ]];then # Is an offline installation?
tar xJf mods/LXDE.tar.xz -C /mnt/
else #online
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/LXDE.tar.xz -O- | tar xJf - -C /mnt/
fi
fi
if [[ $optentorno = 2 ]];then #XFCE4
if [[ $isoffline = "1" ]];then # Is an offline installation?
tar xJf mods/XFCE4.tar.xz -C /mnt/
else #online
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/XFCE4.tar.xz -O- | tar xJf - -C /mnt/
fi
fi
if [[ $optentorno = 4 ]];then #GDM remove in gnome
execl chroot pacman -R gdm --noconfirm
fi
if [[ $optentorno = 5 ]];then #MATE
if [[ $isoffline = "1" ]];then # Is an offline installation?
tar xJf mods/MATE.tar.xz -C /mnt/
else #online
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/MATE.tar.xz -O- | tar xJf - -C /mnt/
fi
fi
if [[ $optentorno = 6 ]];then #Plasma, remove 2 apps
execl chroot pacman -R plasma-mediacenter ksshaskpass --noconfirm
fi
# Create user # Create user
execl chroot useradd -m -G wheel -s /bin/bash $nameuser execl chroot useradd -m -G wheel -s /bin/bash $nameuser
@@ -743,7 +519,6 @@ function installconf {
execl chroot systemctl enable org.cups.cupsd execl chroot systemctl enable org.cups.cupsd
fi fi
# Configure wine if neccesary # Configure wine if neccesary
if [[ $inswine = "1" ]];then if [[ $inswine = "1" ]];then
echo "$(T "Configuring wine for better experience") (32 bit winearch)" echo "$(T "Configuring wine for better experience") (32 bit winearch)"
@@ -751,48 +526,10 @@ function installconf {
fi fi
# Set X11 keyboard, and user GKSU, if there is any enviroment installed # Set X11 keyboard, and user GKSU
if [[ $optentorno != "7" ]];then keyboardlayout
keyboardlayout # Modify gksu for ask user password and not root one
# Modify gksu for ask user password and not root one execl chuser gconftool-2 --set /apps/gksu/sudo-mode --type=bool true --owner=$(echo $nameuser)
execl chuser gconftool-2 --set /apps/gksu/sudo-mode --type=bool true --owner=$(echo $nameuser)
fi
# Install and configure bootloader GRUB/rEFInd
if [[ -z $partefi ]];then #If it dont have EFI
case $optboot in
1)
execl chroot pacman -S grub os-prober --noconfirm
#Arranque silencioso
sed -i 's/\GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 vga=current"/g' /mnt/etc/default/grub
echo "Instalando GRUB para BIOS/MBR"
#Se usa la variable ${hd} que se escogió al principio
execl chroot grub-install --target=i386-pc /dev/${hd}
execl chroot grub-mkconfig -o /boot/grub/grub.cfg
;;
esac
else #With EFI
case $optboot in
1)
echo "Instalando rEFInd para UEFI"
execl chroot pacman -S efibootmgr dosfstools refind-efi --noconfirm
execl chroot refind-install
rootuuid=$(blkid -o value -s UUID /dev/$(echo $particionraiz))
echo '"Boot with standard options" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet loglevel=3 vga=current"' > /mnt/boot/refind_linux.conf
echo '"Boot in nomodeset mode" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet loglevel=3 vga=current nomodeset"' >> /mnt/boot/refind_linux.conf
echo '"Boot to single-user mode" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet single"' >> /mnt/boot/refind_linux.conf
echo '"Boot with minimal options" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap"' >> /mnt/boot/refind_linux.conf
;;
2)
echo "Instalando GRUB en modo UEFI, puede fallar"
execl chroot pacman -S grub os-prober efibootmgr dosfstools --noconfirm
sed -i 's/\GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 vga=current"/g' /mnt/etc/default/grub
execl chroot grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub_uefi --recheck
execl chroot grub-mkconfig -o /boot/grub/grub.cfg
mostrardialog "GRUB" "GRUB fue instalado. Si no funciona, verificar en la bios que este seleccionado grub_uefi o grub como arranque, y no Windows u otro"
;;
esac
fi
# Hostname # Hostname
echo "JKArch" > /mnt/etc/hostname echo "JKArch" > /mnt/etc/hostname
@@ -800,6 +537,30 @@ function installconf {
# Linux kernel # Linux kernel
execl chroot mkinitcpio -p linux #Hacemos el mkinitcpio después de tener instalados los gráficos execl chroot mkinitcpio -p linux #Hacemos el mkinitcpio después de tener instalados los gráficos
confirm=`yesnobox "¿Instalar gestor de arranque? (Pulsar SI a no ser que sepas lo que haces)"`
if [[ $confirm == "Y" ]];then
# Install and configure bootloader GRUB/rEFInd
if [[ -z $partefi ]];then #If it dont have EFI
execl chroot pacman -S grub os-prober --noconfirm
#Arranque silencioso
sed -i 's/\GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 vga=current"/g' /mnt/etc/default/grub
echo "Instalando GRUB para BIOS/MBR"
#Se usa la variable ${hd} que se escogió al principio
execl chroot grub-install --target=i386-pc /dev/${hd}
execl chroot grub-mkconfig -o /boot/grub/grub.cfg
else #With EFI
echo "Instalando rEFInd para UEFI"
execl chroot pacman -S efibootmgr dosfstools refind-efi --noconfirm
execl chroot refind-install
rootuuid=$(blkid -o value -s UUID /dev/$(echo $particionraiz))
echo '"Boot with standard options" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet loglevel=3 vga=current"' > /mnt/boot/refind_linux.conf
echo '"Boot in nomodeset mode" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet loglevel=3 vga=current nomodeset"' >> /mnt/boot/refind_linux.conf
echo '"Boot to single-user mode" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap quiet single"' >> /mnt/boot/refind_linux.conf
echo '"Boot with minimal options" "root=UUID='$(echo $rootuuid)' rw add_efi_memmap"' >> /mnt/boot/refind_linux.conf
fi
fi
# Clean pacman # Clean pacman
echo "$(T "Cleaning")" echo "$(T "Cleaning")"
execl chroot rm -rf $sfslocate/var/cache/pacman/pkg/* execl chroot rm -rf $sfslocate/var/cache/pacman/pkg/*
@@ -853,28 +614,6 @@ function keyboardlayout {
echo 'EndSection' >> /mnt/etc/X11/xorg.conf.d/00-keyboard.conf echo 'EndSection' >> /mnt/etc/X11/xorg.conf.d/00-keyboard.conf
} }
function bootselect {
if [[ -z $partefi ]];then
#Si no usa EFI, preguntar por instalar GRUB
optboot=`dialog --stdout --nocancel --menu "¿Instalar bootloader/gestor de arranque?" 0 0 4 1 "Si (GRUB)" 2 "No, no instalar gestor de arranque"`
case $optboot in
2)
#No hará nada
mostrardialog "Bootloader" "$(T "No new bootloader will be installed")"
;;
esac
else
#Si usa EFI, preguntar por instalar rEFInd
optboot=`dialog --stdout --nocancel --menu "¿Instalar bootloader/gestor de arranque?" 0 0 4 1 "Si (rEFInd) (Recomendado)" 2 "Si (GRUB) (Suele fallar)" 3 "No, no instalar gestor de arranque"`
case $optboot in
3)
#No hará nada
mostrardialog "Bootloader" "$(T "No new bootloader will be installed")"
;;
esac
fi
}
##End of declaring functions, start of script ##End of declaring functions, start of script
clear clear
@@ -893,25 +632,18 @@ umount /mnt/
particiones particiones
horaidioma horaidioma
entorno
#Programas de usuario si hay entorno escogido #Programas de usuario si hay entorno escogido
if [[ $optentorno != "7" ]];then allpackages=$allpackages" "$(execl chroot pacman -Ssq xf86-video-*);;
graficos
#Variable para poner el teclado bien en x11 #Variable para poner el teclado bien en x11
hastosetxkb=1 hastosetxkb=1
#Aqui va la personalizacion de programas, ya que son graficos. #Aqui va la personalizacion de programas, ya que son graficos.
programasguiuser programasguiuser
fi
# Ask for user and password for the new system # Ask for user and password for the new system
userpass userpass
#GRUB/rEFInd select
bootselect
clear clear
# Resumen de los cambios # Resumen de los cambios
tput setaf 6 tput setaf 6

View File

@@ -565,7 +565,7 @@ function entorno {
# Basic programs (Xorg) and audio support if there is selected any # Basic programs (Xorg) and audio support if there is selected any
if [[ $optentorno != 7 ]];then if [[ $optentorno != 7 ]];then
#Gestor de energia xfce4-power-manager #Gestor de energia xfce4-power-manager
allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager lxtask" allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks2 networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager lxtask"
fi fi
} }
# End of functions that are user interactive for configuring system # End of functions that are user interactive for configuring system