Don't allow skipping root partition formatting, it's needed in most cases

This commit is contained in:
natemaia 2018-10-28 23:26:41 -07:00
parent c9a6a08cce
commit 92fb1c6cff
4 changed files with 32 additions and 21 deletions

View File

@ -12,7 +12,7 @@
# globals { # globals {
# immutable values # immutable values
readonly VER="1.7.9" # Installer version readonly VER="1.7.11" # Installer version
readonly DIST="ArchLabs" # Linux distributor readonly DIST="ArchLabs" # Linux distributor
readonly LIVE="liveuser" # Live session user readonly LIVE="liveuser" # Live session user
readonly MNT="/mnt/install" # Install mountpoint readonly MNT="/mnt/install" # Install mountpoint
@ -233,7 +233,7 @@ select_wm_or_de() {
WM_NUM=$(awk '{print NF}' <<< "$INSTALL_WMS") WM_NUM=$(awk '{print NF}' <<< "$INSTALL_WMS")
WM_PACKAGES="${INSTALL_WMS/dwm/}" # remove dwm as we are compiling from source WM_PACKAGES="${INSTALL_WMS/dwm/}" # remove dwm as we are compiling from source
WM_PACKAGES="${INSTALL_WMS// / }" # substitute all double spaces to single WM_PACKAGES="${WM_PACKAGES// / }" # remove double spaces from the string
# packages needed for the selected WMs/DEs # packages needed for the selected WMs/DEs
for wm in $INSTALL_WMS; do for wm in $INSTALL_WMS; do
@ -244,13 +244,13 @@ select_wm_or_de() {
gnome) WM_PACKAGES+=" gnome-extra" ;; gnome) WM_PACKAGES+=" gnome-extra" ;;
i3-gaps) WM_PACKAGES+=" i3status perl-anyevent-i3" ;; i3-gaps) WM_PACKAGES+=" i3status perl-anyevent-i3" ;;
xfce4) WM_PACKAGES+=" xfce4-goodies xfce4-pulseaudio-plugin" ;; xfce4) WM_PACKAGES+=" xfce4-goodies xfce4-pulseaudio-plugin" ;;
openbox) WM_PACKAGES+=" obconf archlabs-obkey archlabs-kickshaw archlabs-skippy-xd tint2 conky jgmenu" ;; openbox) WM_PACKAGES+=" archlabs-obkey archlabs-kickshaw archlabs-skippy-xd obconf tint2 conky jgmenu" ;;
esac esac
done done
if [[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps) ]]; then if [[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps) ]]; then
WM_PACKAGES+=" rofi termite thunar archlabs-polybar archlabs-paranoid" WM_PACKAGES+=" rofi termite thunar archlabs-polybar archlabs-paranoid"
WM_PACKAGES+=" lxappearance libmpdclient jsoncpp archlabs-screenlock archlabs-oblogout" WM_PACKAGES+=" libmpdclient jsoncpp archlabs-screenlock archlabs-oblogout"
elif [[ $INSTALL_WMS =~ (xfce4) ]]; then elif [[ $INSTALL_WMS =~ (xfce4) ]]; then
WM_PACKAGES+=" archlabs-oblogout archlabs-screenlock archlabs-paranoid" WM_PACKAGES+=" archlabs-oblogout archlabs-screenlock archlabs-paranoid"
fi fi

View File

@ -163,7 +163,7 @@ login_manager() {
if [[ $LOGIN_TYPE == 'lightdm' ]]; then if [[ $LOGIN_TYPE == 'lightdm' ]]; then
rm -rf $service rm -rf $service
for f in $MNT/home/$LIVE/.{xinitrc,zprofile}; do for f in $MNT/home/$LIVE/.{xinitrc,zprofile}; do
awk '{if($0 && $0 !~ "^#") print "# "$0; else print $0}' $f > $f sed -i '/^#\|^$/! s/^/# /' $f
done done
chrun 'systemctl enable lightdm.service && systemctl set-default graphical.target' chrun 'systemctl enable lightdm.service && systemctl set-default graphical.target'
cat > $MNT/etc/lightdm/lightdm-gtk-greeter.conf << EOF cat > $MNT/etc/lightdm/lightdm-gtk-greeter.conf << EOF
@ -173,7 +173,7 @@ login_manager() {
active-monitor=0 active-monitor=0
default-user-image=/usr/share/icons/ArchLabs-Dark/64x64/places/distributor-logo-archlabs.png default-user-image=/usr/share/icons/ArchLabs-Dark/64x64/places/distributor-logo-archlabs.png
background=/usr/share/backgrounds/archlabs/archlabs.jpg background=/usr/share/backgrounds/archlabs/archlabs.jpg
theme-name=Adwaita-Dark theme-name=Adwaita-dark
icon-theme-name=Adwaita icon-theme-name=Adwaita
font-name=DejaVu Sans Mono 11 font-name=DejaVu Sans Mono 11
position=30%,end 50%,end position=30%,end 50%,end

View File

@ -159,20 +159,19 @@ select_mount_opts() {
select_filesystem() { select_filesystem() {
local part="$1" local part="$1"
local cur_fs local cur_fs="$(lsblk -lno FSTYPE $part)"
cur_fs="$(lsblk -lno FSTYPE $part)" local str="$([[ $cur_fs && $part != $ROOT_PART ]] && printf "\nExisting Filesystem: %s" "$cur_fs")"
tput civis tput civis
local fs local fs
fs="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $_FSTitle: $part " \ fs="$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $_FSTitle: $part " \
--menu "\nSelect which filesystem you want to use for $part\n\nPartition Name: ${part}$([[ $cur_fs ]] && --menu "\nSelect which filesystem you want to use for $part\n\nPartition Name: ${part}${str}$_FSBody" 0 0 0 \
printf "\nExisting Filesystem: %s" "$cur_fs")$_FSBody" 0 0 0 \ $([[ $cur_fs && $part != $ROOT_PART ]] && printf "%s" "$_Skip -") \
$([[ $cur_fs ]] && printf "%s -" "$_Skip") \ "ext4" "${FS_CMDS[ext4]}" "ext3" "${FS_CMDS[ext3]}" \
"ext4" "${FS_CMDS[ext4]}" "ext3" "${FS_CMDS[ext3]}" \ "ext2" "${FS_CMDS[ext2]}" "vfat" "${FS_CMDS[vfat]}" \
"ext2" "${FS_CMDS[ext2]}" "vfat" "${FS_CMDS[vfat]}" \ "ntfs" "${FS_CMDS[ntfs]}" "f2fs" "${FS_CMDS[f2fs]}" \
"ntfs" "${FS_CMDS[ntfs]}" "f2fs" "${FS_CMDS[f2fs]}" \ "jfs" "${FS_CMDS[jfs]}" "nilfs2" "${FS_CMDS[nilfs2]}" \
"jfs" "${FS_CMDS[jfs]}" "nilfs2" "${FS_CMDS[nilfs2]}" \ "reiserfs" "${FS_CMDS[reiserfs]}" "xfs" "${FS_CMDS[xfs]}")"
"reiserfs" "${FS_CMDS[reiserfs]}" "xfs" "${FS_CMDS[xfs]}")"
[[ $fs == "$_Skip" ]] && return 0 [[ $fs == "$_Skip" ]] && return 0
[[ $fs == "" ]] && return 1 [[ $fs == "" ]] && return 1

View File

@ -72,11 +72,23 @@ printq() {
q=$(awk '{print int(NF / 4)}' <<< "$str") q=$(awk '{print int(NF / 4)}' <<< "$str")
str="$(awk '{ str="$(awk '{
pkgs1=pkgs2=pkgs3=pkgs4="" pkgs1=pkgs2=pkgs3=pkgs4=""
for (i=1;i<'"$q"';i++) { pkgs1=pkgs1" "$i } for (i=1;i<'"$q"';i++) {
for (i='"$q"';i<'"$((q * 2))"';i++) { pkgs2=pkgs2" "$i } if (i == 1) {
for (i='"$((q * 2))"';i<'"$((q * 3))"';i++) { pkgs3=pkgs3" "$i } pkgs1=$i
for (i='"$((q * 3))"';i<NF;i++) { pkgs4=pkgs4" "$i } } else {
printf "%s\n %s\n %s\n %s", pkgs1, pkgs2, pkgs3, pkgs4 pkgs1=pkgs1" "$i
}
}
for (i='"$q"';i<'"$((q * 2))"';i++) {
pkgs2=pkgs2" "$i
}
for (i='"$((q * 2))"';i<'"$((q * 3))"';i++) {
pkgs3=pkgs3" "$i
}
for (i='"$((q * 3))"';i<NF;i++) {
pkgs4=pkgs4" "$i
}
printf "%s\n %s\n %s\n %s", pkgs1, pkgs2, pkgs3, pkgs4
}' <<< "$str")" }' <<< "$str")"
fi fi
printf "%s\n" "$str" printf "%s\n" "$str"