Commit 8acc84a1 authored by fsmithred's avatar fsmithred

fix bugs

parent 2a17de08
refractainstaller-gui (9.5.2) unstable; urgency=low
* Remove null column from yad partition/drive lists.
* Don't add esp to fstab in bios boot.
* Test for GRUB_ENABLE_CRYPTODISK before adding it.
-- fsmithred <fsmithred@gmail.com> Fri, 22 Feb 2019 16:40:00 -0500
refractainstaller-gui (9.5.1) unstable; urgency=low
* Remove uefi bootloader warning from bios install.
......
......@@ -21,9 +21,9 @@ Depends: ${shlibs:Depends}, ${misc:Depends},
util-linux (>=2.17.2),
gparted (>=0.7.0),
yad ( >=0.17.1.1),
refractainstaller-base (>= 9.5.1),
refractainstaller-base (>= 9.5.2),
xterm
Replaces: refractainstaller (<< 9.0.0), refractainstaller-gui (<< 9.5.1)
Replaces: refractainstaller (<< 9.0.0), refractainstaller-gui (<< 9.5.2)
Description: tool to install a running live-CD to hard drive.
Refracta Installer installs a live-CD or live-usb-hdd, including any
changes you've made to the running system onto a hard drive. This is
......
#!/usr/bin/env bash
version="Refracta UEFI/BIOS Installer (Yad) 9.5.0 (20181103)"
version="Refracta UEFI/BIOS Installer (Yad) 9.5.2 (20190222)"
TEXTDOMAIN=refractainstaller-gui
TEXTDOMAINDIR=/usr/share/locale/
# Copyright 2011-2018 fsmithred@gmail.com
# Copyright 2011-2019 fsmithred@gmail.com
# Portions may be copyright Dean Linkous and/or David Hare and/or others.
# UEFI code adapted from contributions by Peter Pranter.
# Based on refractainstaller-8.0.3 by Dean Linkous
......@@ -709,7 +709,7 @@ grub_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[shv]d[a-z]$|*nvme[0-9]n
| sort | awk '{print "\n" $0 }' \
| yad --list --separator="" --title=$"Bootloader" --center --borders=10 --text=$"Choose a location to install the bootloader.
" \
--column ' ' --column 'Hard Drives' --height=200)
--column 'Hard Drives' --height=200)
if [[ -z $grub_dev ]] ; then
yad --title=$"Error" --window-icon=error --center --borders=10 --button=$"Yes, I'm sure.":0 --button=$"Go back":1 \
......@@ -731,7 +731,7 @@ elif [[ $answer = 1 ]] ; then
grub_partition=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[shv]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \
| sort | awk '{print "\n" $0 }' \
| yad --list --title=$"Bootloader" --center --borders=10 --text=$"Select a partition for the bootloader (GRUB)." \
--separator="" --column ' ' --column $'Partitions' --height=380 --width=150)
--separator="" --column $'Partitions' --height=380 --width=150)
if [[ -z $grub_partition ]] ; then
yad --title=$"Error" --window-icon=error --center --borders=10 --button=$"Yes, I'm sure.":0 --button=$"Go back":1 \
......@@ -778,7 +778,7 @@ choose_boot () {
boot_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[shv]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \
| sort | awk '{if ($0 != "'$esp_dev'") {print "\n" $0 }}' \
| yad --list --title=$"/boot partition" --center --borders=10 --text=$"Select a partition for /boot." \
--separator="" --column ' ' --column $'Partitions' --height=380 --width=200 --button=$"OK":0)
--separator="" --column $'Partitions' --height=380 --width=200 --button=$"OK":0)
}
if [[ $sep_boot = "yes" ]]; then
......@@ -820,7 +820,7 @@ choose_root () {
install_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[shv]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \
| sort | awk '{if ($0 != "'$esp_dev'") {print "\n" $0 }}' \
| yad --list --title=$"Root Partition" --center --borders=10 --text=$"Choose a partition to use for the installation of the operating system." \
--separator="" --column ' ' --column $'Partitions' --height 380 --width 200 --button=$"OK":0)
--separator="" --column $'Partitions' --height 380 --width 200 --button=$"OK":0)
if [[ -z $install_dev ]] ; then
yad --window-icon=error --title=$"Error" --center --borders=10 --button=$"Go back":0 --button=$"Exit":1 \
......@@ -881,7 +881,7 @@ choose_home () {
home_dev=$(find /dev -mindepth 1 -maxdepth 1 | egrep "*[shv]d[a-z][1-99]|*nvme[0-9]n[0-9]p[1-99]|*mmcblk[0-9]p[1-99]" \
| sort | awk '{if ($0 != "'$esp_dev'") {print "\n" $0 }}' \
| yad --list --title=$"/home partition" --center --borders=10 --text=$"Select a partition for /home" \
--separator="" --column ' ' --column $'Partitions' --height=380 --width=200 --button=$"OK":0)
--separator="" --column $'Partitions' --height=380 --width=200 --button=$"OK":0)
if [[ -n $home_dev ]] ; then
if ! [[ -b $home_dev ]] ; then
yad --info --title="Error" --center --borders=10 --button=$"Go back":0 --button=$"Exit":1 \
......@@ -953,7 +953,7 @@ fi
choose_swap () {
swap_info=$(/sbin/blkid |grep swap | awk '{if ($0 != "'$esp_dev'") {print "\n" $0 }}' \
| yad --list --title=$"swap partition" --center --borders=10 --text=$"Select a partition for swap." \
--separator="" --column ' ' --column $'Partitions' --height=180 --width=600 --button=$"OK":0)
--separator="" --column $'Partitions' --height=180 --width=600 --button=$"OK":0)
swap_dev=$(echo $swap_info | awk -F: '{ print $1 }')
if [[ -z $swap_dev ]] ; then
yad --window-icon=error --title=$"Error" --center --borders=10 --text=$"You did not choose a swap partition.
......@@ -1601,7 +1601,9 @@ fi
##### May need to check for /etc/default/grub and warn if absent ##########
# Tell grub to use encrypted /boot directory.
if [[ $encrypt_boot = yes ]] ; then
echo -e "\nGRUB_ENABLE_CRYPTODISK=y\n" >> /target/etc/default/grub
if ! [[ $(grep ^GRUB_ENABLE_CRYPTODISK /target/etc/default/grub) ]] ; then
echo -e "\nGRUB_ENABLE_CRYPTODISK=y\n" >> /target/etc/default/grub
fi
fi
......@@ -1636,7 +1638,8 @@ if [[ -n "$esp_dev" ]] ; then
fi
# add entry for esp_dev to fstab if needed
if [[ $uefi_ready = "yes" ]] ; then
if [[ $uefi_ready = "yes" ]] && [[ $uefi_boot = "yes" ]] ; then
if [[ $use_uuid = "yes" ]]; then
esp_part="$(/sbin/blkid -s UUID $esp_dev | awk '{ print $2 }' | sed 's/\"//g')"
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment