summaryrefslogtreecommitdiff
path: root/configs/profile/root-image/root/.install-systemd-mate/language/gl/install.sh
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-03-27 20:53:45 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-05-01 23:58:14 -0400
commit5faac3e6a166a12a3a0cbb50be21a73632725651 (patch)
treef3118df3aecf2dc9f9f6013102f1c1d664599f53 /configs/profile/root-image/root/.install-systemd-mate/language/gl/install.sh
parent640513f18fec15f24fedf43eb8e86dfae6530637 (diff)
consolidate install wizards into unified implementation
this is admitedly a huge change, nearly a total re-write the original scripts were very brittle and redundant even without functional changes, a DRY refactoring would have been nearly as massive the functional changes for rubustness, were also quite significant it would not have been feasibe to break them down * consolidated all per-init and per-language scripts sets into one * extracted translatable strings into separate file * remvoed confusing main menu, in favor of sequential prompts * better error handling and logging * added cfdisk support for CLI ISOs (GUI ISO still launches gparted) * ensure that all target partitions are formatted
Diffstat (limited to 'configs/profile/root-image/root/.install-systemd-mate/language/gl/install.sh')
-rwxr-xr-xconfigs/profile/root-image/root/.install-systemd-mate/language/gl/install.sh177
1 files changed, 0 insertions, 177 deletions
diff --git a/configs/profile/root-image/root/.install-systemd-mate/language/gl/install.sh b/configs/profile/root-image/root/.install-systemd-mate/language/gl/install.sh
deleted file mode 100755
index e3da501..0000000
--- a/configs/profile/root-image/root/.install-systemd-mate/language/gl/install.sh
+++ /dev/null
@@ -1,177 +0,0 @@
-#!/bin/bash
-#Temporal is a file that contains parameters to use when access to chroot
-
-
-partition(){
-
- #Search and show the Hard Disks to select
- aux=$(ls /dev/sd?)
- index=0
- for i in $aux; do
- hdds[$index]="${i} ${i#/*/} off"
- index=$((index+1))
- done
-
- hdd=$(dialog --stdout --radiolist "Selecciona Disco Duro" 20 70 50 ${hdds[@]})
-
- #If exist the line delete
- if (cat /root/.install-systemd-mate/temporal | grep "hdd=") &>/dev/null
- then
- sed -i -e '/hdd=*/d' /root/.install-systemd-mate/temporal
- fi
-
- #And add the new line with new parameter
- echo "hdd=$hdd" >> /root/.install-systemd-mate/temporal
-
- selection=$(dialog --stdout --menu "Metodo de Particionado" 20 70 50 \
- 1 "Usar todo o disco con swap (1GB) and /" \
- 2 "Usar gparted para personalizar" )
-
- case $selection in
- 1)
- umount /mnt &> /dev/null
- #Create msdos partition table
- parted -s $hdd -- mklabel msdos
-
- #Create partition swap and /
- parted -s $hdd -- mkpart primary 1MiB 1000MiB mkpart primary 1000MiB -1s
-
- #Boot option partition /
- parted -s $hdd -- set 2 boot on
-
- #Format and partitions and mount /
- (echo t; echo 1; echo 82; echo w) | fdisk $hdd
- mkswap ${hdd}1
- mkfs.ext4 ${hdd}2
- mount ${hdd}2 /mnt
- ;;
- 2)
- gparted $hdd
-
- #Search and show the partitions that select before.
- aux=$(ls $hdd?)
- index=0;
- for i in $aux; do
- partitions[$index]="${i} ${i#/*/} off"
- index=$((index+1))
- done
-
- partition=$(dialog --stdout --radiolist "Montar particion /" 20 70 50 ${partitions[@]})
-
- #Mount partition /
- umount /mnt &> /dev/null
- mount $partition /mnt
-
- #Ask if you want mount other partitions
- other=0
- while [ $other != 3 ]; do
- other=$(dialog --stdout --menu "¿Montar outra particion?" 20 70 50 1 "/home" 2 "/boot" 3 "No")
-
- case $other in
- 1)
- umount /mnt/home &> /dev/null
- mkdir /mnt/home &> /dev/null
- mount $(dialog --stdout --radiolist "Montar particion /home" 20 70 50 ${partitions[@]}) /mnt/home
- ;;
- 2)
- umount /mnt/boot &> /dev/null
- mkdir /mnt/boot &> /dev/null
- mount $(dialog --stdout --radiolist "Mount particion /boot" 20 70 50 ${partitions[@]}) /mnt/boot
- ;;
- *)
- other=3
- ;;
- esac
- done
- ;;
- esac
-}
-
-
-pacman -Sy archlinux-keyring archlinux32-keyring parabola-keyring --noconfirm
-pacman-key --populate archlinux archlinux32 parabola
-pacman-key --refresh-keys
-
-option=0
-while [ option != 7 ]; do
- option=$(dialog --stdout --menu "Instalación CLI de Parabola" 20 70 50 \
- 1 "Formatear e Montar Particiones" \
- 2 "Instalar Sistema Base" \
- 3 "Instalar GRUB" \
- 4 "Configuración do Sistema" \
- 5 "(Opcional) Instalar Escritorio/Aplicaciones de Live DVD" \
- 6 "Crear Conta de Usuario" \
- 7 "Salir" )
-
- case $option in
- 1)
- partition
- ;;
- 2)
- #Install base system
- pacstrap /mnt
- pacstrap /mnt dialog
- ;;
- 3)
- #Install grub
- pacstrap /mnt grub grub2-theme-gnuaxiom
- #Enable Parabola theme for grub
- sed -i 's|^#GRUB_THEME=.*|GRUB_THEME=/boot/grub/themes/parabola-laf/theme.txt|' /mnt/etc/default/grub
- ;;
- 4)
- #Generate fstab and acces to chroot to do System Config
- genfstab -p /mnt >> /mnt/etc/fstab
- cp /root/.install-systemd-mate/temporal /mnt
- cp /root/.install-systemd-mate/systemConfig.sh /mnt
- chmod +x /mnt/systemConfig.sh
- arch-chroot /mnt /systemConfig.sh
- rm -r /mnt/systemConfig.sh
- ;;
- 5)
- #Packages to the X11 live
- packages=( $( cat ./packages ) )
-
- #Install packages
- pacstrap /mnt ${packages[@]}
- user=$(cat /root/.install-systemd-mate/temporal | grep "userName" )
-
- #Copy skel in the new system and desktop's background
- cp -a /etc/skel/ /mnt/etc/
-
- #Uncomment to allow members of group wheel to execute any command
- sed -i 's|[#] [%]wheel ALL=[(]ALL[)] ALL|%wheel ALL=(ALL) ALL|' /mnt/etc/sudoers
-
- #Enable services
- cp -a /root/.install-systemd-mate/x11.sh /mnt
-
- #Enable services with systemd
- chmod +x /mnt/x11.sh
- arch-chroot /mnt /x11.sh
- rm /mnt/x11.sh
- ;;
- 6)
- #Create a new username and save in temporal, to use after
- if (cat /root/.install-systemd-mate/temporal | grep "userName=") &>/dev/null
- then
- sed -i -e '/userName=*/d' /root/.install-systemd-mate/temporal
- fi
-
- echo "userName=$(dialog --stdout --inputbox "Introduce un nome de usuario" 8 40)" >> /root/.install-systemd-mate/temporal
- cp /root/.codecheck /mnt
- cp /root/.install-systemd-mate/temporal /mnt
- cp /root/.install-systemd-mate/userAccount.sh /mnt
- chmod +x /mnt/userAccount.sh
- arch-chroot /mnt /userAccount.sh
- rm -r /mnt/userAccount.sh
- ;;
- *)
- #Delete temporal file and umount partitions
- rm -r /mnt/.codecheck
- rm -r /mnt/temporal
- umount /mnt/boot &> /dev/null
- umount /mnt/home &> /dev/null
- umount /mnt &> /dev/null
- exit
- ;;
- esac
-done