diff --git a/ISOCreateScripts/README.md b/ISOCreateScripts/README.md index 650d5f5..de4dbaa 100644 --- a/ISOCreateScripts/README.md +++ b/ISOCreateScripts/README.md @@ -1,3 +1,2 @@ # Scripts usados por JKANetwork para generar las imagenes de CD que estan en jkarch.jkanetwork.com -# NO FUNCIONA / NOT WORK \ No newline at end of file diff --git a/ISOCreateScripts/depsjkarch.sh b/ISOCreateScripts/depsjkarch.sh deleted file mode 100755 index 6bcd879..0000000 --- a/ISOCreateScripts/depsjkarch.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -## This file download all JKArch dependencies and puts it in a folder with repo created, ready to use - -#Force sudo -if [[ $(/usr/bin/id -u) != "0" ]];then -sudo ${0} $@ -exit -fi - -rm -rf trydeps/ -rm -rf repoofflinejkarch/ -mkdir trydeps -#Only pacstrap for the essential packages for download the rest, pacman, and mirrorlist. Base added to pacman -Sw of later -pacstrap -d trydeps pacman jkarch-mirrorlist -cp /etc/pacman.conf trydeps/etc/pacman.conf - -arch-chroot trydeps/ /usr/bin/pacman -Sw base base-devel yaourt btrfs-progs rsync exfat-utils jkarch-mirrorlist jka-toolkit git wget netctl iw wpa_supplicant dialog sudo alsa-utils dosfstools \ -ntfs-3g bash-completion reflector ntp \ -mesa libva-vdpau-driver mesa-libgl libva-mesa-driver mesa-vdpau libva-intel-driver libvdpau-va-gl virtualbox-guest-utils virtualbox-guest-modules-arch xf86-input-vmmouse open-vm-tools \ -firefox google-chrome chromium opera otter-browser flashplugin \ -libreoffice-fresh abiword gnumeric wps-office leafpad gedit notepadqq \ -vlc qt4 smplayer totem clementine \ -gimp inkscape pinta krita \ -noto-fonts noto-fonts-cjk noto-fonts-emoji ttf-dejavu ttf-liberation ttf-ms-fonts ttf-google-fonts-git \ -evince ristretto librsvg gnome-calculator gnome-disk-utility file-roller lrzip p7zip unace unrar tumbler poppler-glib ffmpegthumbnailer libgsf \ -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 \ -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 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 \ -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 \ -efibootmgr dosfstools refind-efi grub os-prober --noconfirm - -arch-chroot trydeps/ /usr/bin/pacman -Sw $(pacman -Ssq xf86-video-*) --noconfirm -mkdir repoofflinejkarch -mv trydeps/var/cache/pacman/pkg/* repoofflinejkarch/ -rm -rf trydeps/ -cd repoofflinejkarch/ -repo-add localjkarch.db.tar.gz *.pkg.* -rm localjkarch.files -rm localjkarch.db -mv localjkarch.files.tar.gz localjkarch.files -mv localjkarch.db.tar.gz localjkarch.db -rm -f *.old -rm -f *.log -rm -f .log -cd .. -#Permisos -chmod 777 repoofflinejkarch/ -chmod 666 repoofflinejkarch/* diff --git a/ISOCreateScripts/totalisocreate.sh b/ISOCreateScripts/totalisocreate.sh index 607ea9f..f4d89f8 100755 --- a/ISOCreateScripts/totalisocreate.sh +++ b/ISOCreateScripts/totalisocreate.sh @@ -29,11 +29,11 @@ function modifyimage { #Delete packages not needed from official iso - sudo arch-chroot $sfslocate/ /usr/bin/pacman -R clonezilla darkhttpd diffutils grml-zsh-config irssi linux-atm lvm2 man-db man-pages mc ndisc6 nmap smartmontools testdisk vi vim vim-runtime zsh openconnect pcsclite python2 --noconfirm + sudo arch-chroot $sfslocate/ /usr/bin/pacman -R clonezilla darkhttpd diffutils grml-zsh-config irssi linux-atm lvm2 man-db man-pages mc ndisc6 nmap smartmontools testdisk vi vim vim-runtime openconnect pcsclite python2 python reflector --noconfirm #Restore bash shell (not zsh) sudo arch-chroot $sfslocate/ /usr/bin/chsh -s /bin/bash root #Install new - sudo arch-chroot $sfslocate/ /usr/bin/pacman -Su gparted xf86-video-vesa xorg-xinit lwm localepurge --noconfirm --ignore linux #Do not upgrade kernel automatically + sudo arch-chroot $sfslocate/ /usr/bin/pacman -Su gparted xf86-video-vesa xorg-xinit lwm xorg-xrandr xterm localepurge --noconfirm --ignore linux #Do not upgrade kernel automatically #For gparted to work sudo rm $sfslocate/etc/X11/xinit/xinitrc sudo touch $sfslocate/etc/X11/xinit/xinitrc @@ -80,13 +80,8 @@ function bashprofile { sudo echo "#" > $sfslocate/root/.bash_profile sudo echo "# ~/.bash_profile" >> $sfslocate/root/.bash_profile sudo echo "#" >> $sfslocate/root/.bash_profile - if [[ $1 = "Online" ]];then - sudo echo "cd /root/" >> $sfslocate/root/.bash_profile - sudo echo "./downloadinstall.sh" >> $sfslocate/root/.bash_profile - else #Offline - sudo echo "cd /root/offlinefiles/" >> $sfslocate/root/.bash_profile - sudo echo "./selectlang.sh" >> $sfslocate/root/.bash_profile - fi + sudo echo "cd /root/" >> $sfslocate/root/.bash_profile + sudo echo "./downloadinstall.sh" >> $sfslocate/root/.bash_profile sudo echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" >> $sfslocate/root/.bash_profile } @@ -103,70 +98,6 @@ function prepareISOFolder { cp temp/airootfs.sfs iso/arch/x86_64/airootfs.sfs } -##Function online iso create -function createOnline { - # Online ISO Procedure - #Copy important files - prepareISOFolder - - sudo unsquashfs -d $sfslocate/ iso/arch/x86_64/airootfs.sfs - - #Permisos de root de la imagen cambiar temporalmente - sudo chmod 777 $sfslocate/root/ - sudo rm $sfslocate/root/* - - #.bash_profile Online - bashprofile "Online" - - #Copiar fichero instalador - sudo cp ../archinstall/downloadinstall.sh $sfslocate/root/ - - #Resto de modificaciones (las comunes) y cerrado del sfs - modifyimage - - #Creamos la ISO - mkisofs -b isolinux/isolinux.bin -r -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "JKARCH-ISO" -o JKArch-Online-$yearmonth.iso iso/ - sudo rm -rf iso/ - echo "ISO Online creada" -} - -function createOffline { - # Offline ISO Procedure - #Copy important files - prepareISOFolder - - #Unsquash sfs file - sudo unsquashfs -d $sfslocate/ iso/arch/x86_64/airootfs.sfs - - #Permisos de root de la imagen cambiar temporalmente - sudo chmod 777 $sfslocate/root/ - sudo rm $sfslocate/root/* - - #.bash_profile Offline - bashprofile "Offline" - - #Create subfolder and folder at same time - sudo mkdir -p $sfslocate/root/offlinefiles/mods/ - #Esta ruta es absoluta, no vale para todos los sistemas (Es "temporal") - sudo cp ../archinstall/* $sfslocate/root/offlinefiles/ - sudo rm $sfslocate/root/offlinefiles/downloadinstall.sh $sfslocate/root/offlinefiles/archinstall-dev.sh - sudo cp ../mods/* $sfslocate/root/offlinefiles/mods/ - - #Resto de modificaciones (las comunes) y cerrado del sfs - modifyimage - - #Creamos el repositorio - sudo sh depsjkarch.sh - #Lo movemos a su sitio - mkdir -p iso/repo/ - mv repoofflinejkarch/* iso/repo/ - rm -rf repoofflinejkarch/ - - #Creamos la ISO - mkisofs -b isolinux/isolinux.bin -r -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "JKARCH-ISO" -o JKArch-Offline-$yearmonth.iso iso/ - sudo rm -rf iso/ - echo "ISO Offline creada" -} #Date for builds today=$(date +%y%m%d) @@ -193,13 +124,28 @@ if [[ $today != $lastdownload ]];then #Only download one time at day fi -#Switch del argumento $1 para ver si solo se quiere crear una de las dos imagenes iso -case $1 in - "Online") createOnline;; - "Offline") createOffline;; - "") - createOnline - createOffline - ;; -esac +# Create ISO Procedure +#Copy important files +prepareISOFolder + +sudo unsquashfs -d $sfslocate/ iso/arch/x86_64/airootfs.sfs + +#Permisos de root de la imagen cambiar temporalmente +sudo chmod 777 $sfslocate/root/ +sudo rm $sfslocate/root/* + +#.bash_profile +bashprofile + +#Copiar fichero instalador +sudo cp ../archinstall/downloadinstall.sh $sfslocate/root/ + +#Resto de modificaciones (las comunes) y cerrado del sfs +modifyimage + +#Creamos la ISO +mkisofs -b isolinux/isolinux.bin -r -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "JKARCH-ISO" -o JKArch-Online-$yearmonth.iso iso/ +sudo rm -rf iso/ +echo "ISO creado" + echo "Script terminado" \ No newline at end of file diff --git a/installer/installer.sh b/installer/installer.sh index 3cf1e14..6004a6e 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -45,8 +45,8 @@ function showdo { function yesnobox { local title=$1 - #Return Y or N - echo `dialog --stdout --nocancel --menu "$title" 0 0 4 Y "$(T "Yes")" N "No"` + #Exit code is 0 for Yes, and 1 for no + dialog --nocancel --yes-label "$(T "Yes")" --yesno "$title" 0 0 } function fatalerror { @@ -322,7 +322,7 @@ function particiones { ## Date and language function horaidioma { - while [[ $confirm != "Y" ]];do + while [[ $confirm != "0" ]];do varx="" #Empty var langs=$(cat /etc/locale.gen | grep '^#[a-zA-Z]' | cut -f1 -d" " | cut -c2-30 | sort | uniq) for addr in $(echo $langs | tr " " "\n") @@ -337,14 +337,16 @@ function horaidioma { langinst=$(cat /etc/locale.gen | grep -m1 '^#'$opclang | cut -c2-40) #Confirm - confirm=`yesnobox "$(T "Your language:") $opclang. Correcto?"` + yesnobox "$(T "Your language:") $opclang. Correcto?" + confirm=$? # 0->Yes done #End of selecting lang confirm="" #Erase var echo "$(T "Now select your timezone for adjusting the clock")" - while [[ $confirm != "Y" ]];do - NEW_TIMEZONE=$(execl tzselect) - confirm=`yesnobox "$(T "Your timezone is") $NEW_TIMEZONE ?"` + while [[ $confirm != "0" ]];do # 0->Yes + NEW_TIMEZONE=$(execl tzselect) + yesnobox "$(T "Your timezone is") $NEW_TIMEZONE ?" + confirm=$? # 0->Yes done confirm="" #Erase var } @@ -395,12 +397,12 @@ function appsuser { 3) packages="$packages opera";; esac - confirm=`yesnobox "Habilitar soporte bluetooth?"` - if [[ $confirm == "Y" ]];then + yesnobox "Habilitar soporte bluetooth?" + if [[ $? == "0" ]];then packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry " fi - confirm=`yesnobox "Habilitar compatibilidad programas Windows (Usando wine)?"` - if [[ $confirm == "Y" ]];then + yesnobox "Habilitar compatibilidad programas Windows (Usando wine)?" + if [[ $? == "0" ]];then 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 gnome-exe-thumbnailer samba" #Some 32bit libs for winearch 32 work better, and thumbs for .exe (samba needed too) inswine=1 @@ -550,8 +552,8 @@ function installconf { # Linux kernel 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 + yesnobox "¿Instalar gestor de arranque? (Pulsar SI a no ser que sepas lo que haces)" + if [[ $? == "0" ]];then # Install and configure bootloader GRUB/rEFInd if [[ -z $partefi ]];then #If it dont have EFI execl chroot pacman -S grub os-prober --noconfirm @@ -729,14 +731,8 @@ userpass clear # Resumen de los cambios -tput setaf 6 -echo "$(T "Ok, last thing before start installing, summary of changes")" -echo "$(T "Partition scheme before your changes")" -tput setaf 9 -lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL -tput setaf 6 -echo "$(T "Your changes")" -tput setaf 9 + +# Vars before the dialog case $formatoraiz in "mkfs.ext4 -F") mosfraiz="$(T "ext4 formatted")";; @@ -747,8 +743,6 @@ case $formatoraiz in "echo No formatear ") mosfraiz="$(T "not formatted")";; esac -echo "$(T "Root partition"): $particionraiz , $mosfraiz" -if [[ $particionhome ]];then case $formatohome in "mkfs.ext4 -F") mosfhome="$(T "ext4 formatted")";; @@ -759,12 +753,6 @@ case $formatohome in "echo No formatear ") mosfhome="$(T "not formatted")";; esac -echo "$(T "Home partition"): $particionhome , $mosfhome" -fi -if [[ $partefi ]];then - echo "$(T "EFI partition in") $partefi" -fi - # Log options echo "------" >> "/tmp/install.log" echo "Install partition options" >> "/tmp/install.log" @@ -782,25 +770,21 @@ if [[ $particionhome ]];then fi # +# Make the question +dialog --nocancel --stdout --yes-label "Si, instalar" --no-label "No, volver a empezar" --yesno "$(T "Ok, last thing before start installing, summary of changes")\n \ +$(T "Partition scheme before your changes") \n \ +$(lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL) \n \ +$(T "Your changes") \n \ +$(T "Root partition"): $particionraiz , $mosfraiz \n \ +$(T "Home partition"): $particionhome , $mosfhome \n \ +$(if [[ $partefi ]];then echo $(T "EFI partition in") $partefi;fi) \n \ +¿Estas de acuerdo con los cambios y quieres comenzar la instalacion?" -#Pregunta si instalar o no -tput setaf 1 -echo "¿Estas de acuerdo con los cambios y quieres comenzar la instalacion?" -options=("No, volver a empezar" "Si, instalar" "No, apagar el ordenador") -select opt in "${options[@]}" -do - case $opt in - "No, volver a empezar") +if [[ $? == "1" ]];then #If say no, reset install rm /tmp/install.log - exec ./selectlang.sh - break;; - "Si, instalar") break;; - "No, apagar el ordenador") - poweroff - exit - ;; - esac -done + exec ./installer.sh + exit +fi tput setaf 9 # Real install diff --git a/installer/skeluser.tar.xz b/installer/skeluser.tar.xz index dcd5532..b3f117a 100644 Binary files a/installer/skeluser.tar.xz and b/installer/skeluser.tar.xz differ