Fix: issue with removing LVM partitions containing a slash
This commit is contained in:
parent
a239963197
commit
40a5a15fce
40
installer
40
installer
@ -1120,6 +1120,7 @@ part_pretty()
|
|||||||
# find the root device: /dev/sda1 -> /dev/sda, /dev/nvme0n1p12 -> /dev/nvme0n1
|
# find the root device: /dev/sda1 -> /dev/sda, /dev/nvme0n1p12 -> /dev/nvme0n1
|
||||||
drive="$(sed 's/p\?[1-9][0-9]*$//' <<< "$dev")"
|
drive="$(sed 's/p\?[1-9][0-9]*$//' <<< "$dev")"
|
||||||
model=$(lsblk -lno MODEL "$drive" | awk '{gsub(/ |\t/, "_"); print}')
|
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"
|
[[ $size_t == 'K' || ($size_t == 'M' && ${isize%.*} -lt 80) ]] || printf "%s\n" "$dev ${size}__$model"
|
||||||
done < <(lsblk -lno TYPE,PATH,SIZE,FSTYPE,LABEL $part |
|
done < <(lsblk -lno TYPE,PATH,SIZE,FSTYPE,LABEL $part |
|
||||||
awk "/$regexp/"' && !'"/${IGNORE_DEV:-NONEXX}/"' {
|
awk "/$regexp/"' && !'"/${IGNORE_DEV:-NONEXX}/"' {
|
||||||
@ -1237,7 +1238,7 @@ part_countdec()
|
|||||||
{ # loop all passed partitions and remove them from the list, decrementing the counter
|
{ # loop all passed partitions and remove them from the list, decrementing the counter
|
||||||
for p; do
|
for p; do
|
||||||
if (( PART_COUNT )); then
|
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-- ))
|
(( PART_COUNT-- ))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -1603,9 +1604,6 @@ install_main()
|
|||||||
errshow 0 "chrun '$USERCMD'"
|
errshow 0 "chrun '$USERCMD'"
|
||||||
fi
|
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
|
while :; do
|
||||||
dlg choice menu "Finalization" "$_edit" \
|
dlg choice menu "Finalization" "$_edit" \
|
||||||
finished "exit the installer and reboot" \
|
finished "exit the installer and reboot" \
|
||||||
@ -3209,29 +3207,25 @@ al_repo()
|
|||||||
{
|
{
|
||||||
local conf="$1"
|
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
|
if ! grep -q 'ILoveCandy' "$conf" 2> /dev/null; then
|
||||||
sed -i 's/^#Color/Color/' "$conf"
|
sed -i 's/^#Color/Color/' "$conf"
|
||||||
sed -i '/^Color/a ILoveCandy' "$conf"
|
sed -i '/^Color/a ILoveCandy' "$conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >> "$conf" <<- EOF
|
if ! grep -q '\[archlabs]' "$conf" 2> /dev/null; then
|
||||||
|
cat >> "$conf" <<- EOF
|
||||||
|
|
||||||
# [archlabs-testing]
|
# [archlabs-testing]
|
||||||
# Server = https://github.com/ArchLabs/\$repo/raw/master/\$arch
|
# Server = https://github.com/ArchLabs/\$repo/raw/master/\$arch
|
||||||
# Server = https://bitbucket.org/archlabslinux/\$repo/raw/master/\$arch
|
# Server = https://bitbucket.org/archlabslinux/\$repo/raw/master/\$arch
|
||||||
|
|
||||||
[archlabs]
|
[archlabs]
|
||||||
Server = https://bitbucket.org/archlabslinux/\$repo/raw/master/\$arch
|
Server = https://bitbucket.org/archlabslinux/\$repo/raw/master/\$arch
|
||||||
Server = https://github.com/ArchLabs/\$repo/raw/master/\$arch
|
Server = https://github.com/ArchLabs/\$repo/raw/master/\$arch
|
||||||
Server = https://sourceforge.net/projects/archlabs-repo/files/\$repo/\$arch
|
Server = https://sourceforge.net/projects/archlabs-repo/files/\$repo/\$arch
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3593,7 +3587,7 @@ if [[ -z $NOFONT ]]; then
|
|||||||
if [[ $TERM == 'linux' ]]; then
|
if [[ $TERM == 'linux' ]]; then
|
||||||
if [[ -f /tmp/font ]]; then
|
if [[ -f /tmp/font ]]; then
|
||||||
FONT="$(< /tmp/font)"
|
FONT="$(< /tmp/font)"
|
||||||
: "${FONT=ter-i16n}"
|
: "${FONT=ter-i16n}" # if FONT is empty we reset the default 16
|
||||||
setfont "$FONT"
|
setfont "$FONT"
|
||||||
else
|
else
|
||||||
fontsize=16
|
fontsize=16
|
||||||
@ -3629,7 +3623,7 @@ mirrorpid=''
|
|||||||
if [[ ! -f /tmp/new ]]; then
|
if [[ ! -f /tmp/new ]]; then
|
||||||
msg "Update" "\nChecking for installer updates.\n" 0
|
msg "Update" "\nChecking for installer updates.\n" 0
|
||||||
( reflector --list-countries 2>/dev/null | sed '1,2d' | awk 'NF{NF--}; {print}' > /tmp/mcountry ) &
|
( 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 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
|
if (( $(vercmp "$(awk -F= '/^VER=/ {print $2}' /tmp/new)" "$VER") > 0 )); then
|
||||||
cp /tmp/new /usr/local/bin/installer
|
cp /tmp/new /usr/local/bin/installer
|
||||||
@ -3637,9 +3631,11 @@ if [[ ! -f /tmp/new ]]; then
|
|||||||
exec /usr/local/bin/installer "$@"
|
exec /usr/local/bin/installer "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
elif [[ -f /tmp/mirrorpid ]]; then
|
||||||
|
mirrorpid=$(< /tmp/mirrorpid)
|
||||||
|
rm /tmp/mirrorpid
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# warn before starting the background process
|
# warn before starting the background process
|
||||||
if [[ $NOMOUNT ]]; then
|
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"
|
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