Fix: issue with removing LVM partitions containing a slash
This commit is contained in:
parent
a239963197
commit
40a5a15fce
22
installer
22
installer
@ -1120,6 +1120,7 @@ part_pretty()
|
||||
# find the root device: /dev/sda1 -> /dev/sda, /dev/nvme0n1p12 -> /dev/nvme0n1
|
||||
drive="$(sed 's/p\?[1-9][0-9]*$//' <<< "$dev")"
|
||||
model=$(lsblk -lno MODEL "$drive" | awk '{gsub(/ |\t/, "_"); print}')
|
||||
model=$(sed 's/^\s*//; s/\s*$//' <<< "$model")
|
||||
[[ $size_t == 'K' || ($size_t == 'M' && ${isize%.*} -lt 80) ]] || printf "%s\n" "$dev ${size}__$model"
|
||||
done < <(lsblk -lno TYPE,PATH,SIZE,FSTYPE,LABEL $part |
|
||||
awk "/$regexp/"' && !'"/${IGNORE_DEV:-NONEXX}/"' {
|
||||
@ -1237,7 +1238,7 @@ part_countdec()
|
||||
{ # loop all passed partitions and remove them from the list, decrementing the counter
|
||||
for p; do
|
||||
if (( PART_COUNT )); then
|
||||
PARTS="$(sed "/${p##/dev/} /d" <<< "$PARTS")" # sed //d doesn't like slashes so strip the /dev/
|
||||
PARTS="$(sed "/${p##*/} /d" <<< "$PARTS")" # sed //d doesn't like slashes so strip the everything to the last slash
|
||||
(( PART_COUNT-- ))
|
||||
fi
|
||||
done
|
||||
@ -1603,9 +1604,6 @@ install_main()
|
||||
errshow 0 "chrun '$USERCMD'"
|
||||
fi
|
||||
|
||||
# reset the signature check in pacman.conf
|
||||
# tr '\n' '\a' < "$MNT/etc/pacman.conf" | sed 's/\(\[archlabs]\).*SigLevel = Optional TrustAll/\1/' | tr '\a' '\n'
|
||||
|
||||
while :; do
|
||||
dlg choice menu "Finalization" "$_edit" \
|
||||
finished "exit the installer and reboot" \
|
||||
@ -3209,17 +3207,12 @@ al_repo()
|
||||
{
|
||||
local conf="$1"
|
||||
|
||||
# disable the signature check for AL repo in pacman.conf
|
||||
# [[ $(tr '\n' '\a' < "$conf" | grep -o '\[archlabs].*SigLevel = Optional TrustAll' | tr '\a' '\n') ]] && return 0
|
||||
# SigLevel = Optional TrustAll
|
||||
|
||||
grep -q '\[archlabs]' "$conf" 2> /dev/null && return 0
|
||||
|
||||
if ! grep -q 'ILoveCandy' "$conf" 2> /dev/null; then
|
||||
sed -i 's/^#Color/Color/' "$conf"
|
||||
sed -i '/^Color/a ILoveCandy' "$conf"
|
||||
fi
|
||||
|
||||
if ! grep -q '\[archlabs]' "$conf" 2> /dev/null; then
|
||||
cat >> "$conf" <<- EOF
|
||||
|
||||
# [archlabs-testing]
|
||||
@ -3232,6 +3225,7 @@ al_repo()
|
||||
Server = https://sourceforge.net/projects/archlabs-repo/files/\$repo/\$arch
|
||||
|
||||
EOF
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -3593,7 +3587,7 @@ if [[ -z $NOFONT ]]; then
|
||||
if [[ $TERM == 'linux' ]]; then
|
||||
if [[ -f /tmp/font ]]; then
|
||||
FONT="$(< /tmp/font)"
|
||||
: "${FONT=ter-i16n}"
|
||||
: "${FONT=ter-i16n}" # if FONT is empty we reset the default 16
|
||||
setfont "$FONT"
|
||||
else
|
||||
fontsize=16
|
||||
@ -3629,7 +3623,7 @@ mirrorpid=''
|
||||
if [[ ! -f /tmp/new ]]; then
|
||||
msg "Update" "\nChecking for installer updates.\n" 0
|
||||
( reflector --list-countries 2>/dev/null | sed '1,2d' | awk 'NF{NF--}; {print}' > /tmp/mcountry ) &
|
||||
mirrorpid=$!
|
||||
echo $! > /tmp/mirrorpid
|
||||
if curl -fsSL 'https://bitbucket.org/archlabslinux/installer/raw/master/installer' -o /tmp/new; then
|
||||
if (( $(vercmp "$(awk -F= '/^VER=/ {print $2}' /tmp/new)" "$VER") > 0 )); then
|
||||
cp /tmp/new /usr/local/bin/installer
|
||||
@ -3637,9 +3631,11 @@ if [[ ! -f /tmp/new ]]; then
|
||||
exec /usr/local/bin/installer "$@"
|
||||
fi
|
||||
fi
|
||||
elif [[ -f /tmp/mirrorpid ]]; then
|
||||
mirrorpid=$(< /tmp/mirrorpid)
|
||||
rm /tmp/mirrorpid
|
||||
fi
|
||||
|
||||
|
||||
# warn before starting the background process
|
||||
if [[ $NOMOUNT ]]; then
|
||||
wrn="\nA background install process will begin early when using -n flag\n\nSome files may be overwritten during the process\n"
|
||||
|
Reference in New Issue
Block a user