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 {
# immutable values
readonly VER="1.7.9" # Installer version
readonly VER="1.7.11" # Installer version
readonly DIST="ArchLabs" # Linux distributor
readonly LIVE="liveuser" # Live session user
readonly MNT="/mnt/install" # Install mountpoint
@ -233,7 +233,7 @@ select_wm_or_de() {
WM_NUM=$(awk '{print NF}' <<< "$INSTALL_WMS")
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
for wm in $INSTALL_WMS; do
@ -244,13 +244,13 @@ select_wm_or_de() {
gnome) WM_PACKAGES+=" gnome-extra" ;;
i3-gaps) WM_PACKAGES+=" i3status perl-anyevent-i3" ;;
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
done
if [[ $INSTALL_WMS =~ (openbox|bspwm|i3-gaps) ]]; then
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
WM_PACKAGES+=" archlabs-oblogout archlabs-screenlock archlabs-paranoid"
fi

View File

@ -163,7 +163,7 @@ login_manager() {
if [[ $LOGIN_TYPE == 'lightdm' ]]; then
rm -rf $service
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
chrun 'systemctl enable lightdm.service && systemctl set-default graphical.target'
cat > $MNT/etc/lightdm/lightdm-gtk-greeter.conf << EOF
@ -173,7 +173,7 @@ login_manager() {
active-monitor=0
default-user-image=/usr/share/icons/ArchLabs-Dark/64x64/places/distributor-logo-archlabs.png
background=/usr/share/backgrounds/archlabs/archlabs.jpg
theme-name=Adwaita-Dark
theme-name=Adwaita-dark
icon-theme-name=Adwaita
font-name=DejaVu Sans Mono 11
position=30%,end 50%,end

View File

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

View File

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