Fix various issues
This commit is contained in:
parent
87ffbdcb42
commit
2208c3afba
@ -7,7 +7,7 @@
|
||||
|
||||
# shellcheck disable=SC2086,SC2046,SC2254
|
||||
|
||||
VER=2.1.40
|
||||
VER=2.1.41
|
||||
|
||||
# default values {
|
||||
|
||||
@ -1039,7 +1039,7 @@ part_format()
|
||||
local delay="$3"
|
||||
shift 3
|
||||
|
||||
msg "Format" "\nFormatting $(part_pretty "$part") as $fs\n" 0
|
||||
msg "File System Format" "\nFormatting\n\npart: $(part_pretty "$part")\n\nfs: $fs\n" 0
|
||||
mkfs.$fs ${FS_CMD_FLAGS[$fs]} "$part" > /dev/null 2> "$ERR"
|
||||
errshow 0 "mkfs.$fs ${FS_CMD_FLAGS[$fs]} '$part' > /dev/null" || return 1
|
||||
sleep "$delay"
|
||||
@ -1386,42 +1386,31 @@ select_filesystem()
|
||||
{
|
||||
local part="$1"
|
||||
local fs=''
|
||||
local cur txt
|
||||
local cur txt pt
|
||||
pt="$(part_pretty "$part")"
|
||||
cur="$(lsblk -lno FSTYPE "$part" 2> /dev/null)"
|
||||
txt="\nSelect which filesystem to use for: $(part_pretty "$part")\n\nDefault: ext4"
|
||||
txt="\nSelect which file system to use\n\npart: $pt\n\nfs default: ext4"
|
||||
|
||||
if [[ $cur ]]; then
|
||||
# bail early if the partition was created in part_auto()
|
||||
[[ $cur && $part == "$AUTO_ROOT" ]] && return 0
|
||||
[[ $part == "$AUTO_ROOT" ]] && return 0
|
||||
[[ $part != "$ROOT" ]] && txt+="\nCurrent: $cur"
|
||||
fi
|
||||
|
||||
until [[ $fs ]]; do
|
||||
if [[ $cur && $part != "$ROOT" ]]; then
|
||||
dlg fs menu "Filesystem" "$txt\nCurrent: $cur" \
|
||||
skip - \
|
||||
dlg fs menu "File System" "$txt" $([[ $cur && $part != "$ROOT" ]] && printf "skip -") \
|
||||
ext4 "The evolution of the most used Linux file system, successor to Ext3" \
|
||||
ext3 "3rd extended file system, successor to Ext2" \
|
||||
ext2 "2nd extended filesystem, unlike 3/4 it is not journaled and largely obsolete" \
|
||||
vfat "A legacy file system which is simple and robust" \
|
||||
ntfs "Windows NT file system" \
|
||||
ext3 "Third extended file system, successor to Ext2" \
|
||||
ext2 "Second extended file system, unlike 3/4 it is not journaled and obsolete" \
|
||||
vfat "File allocation table, a legacy file system which is simple and robust" \
|
||||
ntfs "NT file system, a journaling file system created by Microsoft" \
|
||||
f2fs "Flash-friendly file system, intended for NAND-based flash memory" \
|
||||
jfs "Journaled file system created by IBM" \
|
||||
xfs "Journaling file system created by Silicon Graphics (SGI)" \
|
||||
jfs "Journaled file system created by IBM and open-sourced in 1999" \
|
||||
xfs "Journaled file system created by Silicon Graphics Inc. (SGI)" \
|
||||
nilfs2 "A log-structured file system implementation for the Linux kernel" \
|
||||
reiserfs "Journaled file system initially created by a team at Namesys led by Hans Reiser" || return 1
|
||||
else
|
||||
dlg fs menu "Filesystem" "$txt" \
|
||||
ext4 "The evolution of the most used Linux filesystem, successor to Ext3" \
|
||||
ext3 "3rd extended file system, successor to Ext2" \
|
||||
ext2 "2nd extended filesystem, unlike 3/4 it is not journaled and largely obsolete" \
|
||||
vfat "A legacy file system which is simple and robust" \
|
||||
ntfs "Windows NT file system" \
|
||||
f2fs "Flash-friendly file system, intended for NAND-based flash memory" \
|
||||
jfs "Journaled file system created by IBM" \
|
||||
xfs "Journaling file system created by Silicon Graphics (SGI)" \
|
||||
nilfs2 "A log-structured file system implementation for the Linux kernel" \
|
||||
reiserfs "Journaled file system initially created by a team at Namesys led by Hans Reiser" || return 1
|
||||
fi
|
||||
reiserfs "Journaled file system created by a team at Namesys led by Hans Reiser" || return 1
|
||||
[[ $fs == 'skip' ]] && return 0
|
||||
yesno "Filesystem" "\nFormat $(part_pretty "$part") as $fs?\n" || fs=''
|
||||
yesno "File System" "\nConfirm Format\n\npart: $pt\n\nfs: $fs\n" || fs=''
|
||||
done
|
||||
part_format "$part" "$fs" 0
|
||||
}
|
||||
@ -1457,7 +1446,12 @@ install_main()
|
||||
chrun "hwclock --systohc --utc" || chrun "hwclock --systohc --utc --directisa"
|
||||
install_user
|
||||
install_login
|
||||
|
||||
# allow members of the wheel group to run commands as root
|
||||
sed -i "s/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" "$MNT/etc/sudoers"
|
||||
|
||||
chrun "chown -Rf $NEWUSER:users /home/$NEWUSER"
|
||||
|
||||
if [[ "$USER_CMD" ]]; then
|
||||
chrun "$USER_CMD" 2> "$ERR" 2>&1
|
||||
errshow 0 "chrun '$USER_CMD'"
|
||||
@ -1506,7 +1500,10 @@ install_base()
|
||||
unset BG_PID
|
||||
fi
|
||||
|
||||
if (( PACSTRAP )); then
|
||||
mkdir -pv "$MNT/etc/default"
|
||||
mkdir -pv "$MNT/etc/X11/xorg.conf.d/"
|
||||
|
||||
if [[ $PACSTRAP == 1 ]]; then
|
||||
cp -vf /etc/modprobe.d/* "$MNT/etc/modprobe.d/"
|
||||
cp -vf /etc/X11/xorg.conf.d/* "$MNT/etc/X11/xorg.conf.d/"
|
||||
# we have some customizations in /etc on the iso we want to preserve
|
||||
@ -1547,14 +1544,12 @@ install_base()
|
||||
# allow members of the wheel group to run commands as root
|
||||
sed -i "s/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g" "$MNT/etc/sudoers"
|
||||
|
||||
mkdir -pv "$MNT/etc/default"
|
||||
echo "LANG=$LOCALE" > "$MNT/etc/locale.conf"
|
||||
cp -fv "$MNT/etc/locale.conf" "$MNT/etc/default/locale"
|
||||
sed -i "s/#en_US.UTF-8/en_US.UTF-8/g; s/#${LOCALE}/${LOCALE}/g" "$MNT/etc/locale.gen"
|
||||
chrun "locale-gen"
|
||||
chrun "ln -svf /usr/share/zoneinfo/$ZONE/$SUBZ /etc/localtime"
|
||||
|
||||
mkdir -pv "$MNT/etc/X11/xorg.conf.d"
|
||||
cat > "$MNT/etc/X11/xorg.conf.d/00-keyboard.conf" <<- EOF
|
||||
# Use localectl(1) to instruct systemd-localed to update it.
|
||||
Section "InputClass"
|
||||
@ -1965,7 +1960,7 @@ install_background()
|
||||
|
||||
(
|
||||
install_mirrorlist "/etc/pacman.d/mirrorlist" > /tmp/bgout 2>&1
|
||||
if (( PACSTRAP )); then
|
||||
if [[ $PACSTRAP == 1 ]]; then
|
||||
pacstrap /mnt >> /tmp/bgout 2>&1
|
||||
else
|
||||
rsync -avh /run/archiso/sfs/airootfs/ "$MNT/" >> /tmp/bgout 2>&1
|
||||
@ -1976,7 +1971,7 @@ install_background()
|
||||
cp /etc/pacman.d/mirrorlist "$MNT/etc/pacman.d/mirrorlist"
|
||||
al_repo "$MNT/etc/pacman.conf"
|
||||
|
||||
if (( PACSTRAP )); then
|
||||
if [[ $PACSTRAP == 1 ]]; then
|
||||
chrun "pacman -S ${ISO_PKGS[*]} $net $luks --noconfirm --needed" >> /tmp/bgout 2>&1
|
||||
else
|
||||
chrun "pacman -Syyu $net --noconfirm --needed" >> /tmp/bgout 2>&1
|
||||
@ -2228,7 +2223,7 @@ prerun_systemd-boot()
|
||||
mkdir -pv "$MNT/boot/loader/entries"
|
||||
|
||||
cat > "$MNT/boot/loader/loader.conf" <<- EOF
|
||||
default $DIST
|
||||
default $DIST.conf
|
||||
timeout 5
|
||||
editor no
|
||||
EOF
|
||||
|
Reference in New Issue
Block a user