Cleanup a few spots
This commit is contained in:
parent
55db41cb73
commit
be74c0c40f
@ -1045,11 +1045,11 @@ part_mount()
|
|||||||
mkdir -p "$mntpt"
|
mkdir -p "$mntpt"
|
||||||
|
|
||||||
if [[ $ignore -ne 2 && $fs && ${FS_OPTS[$fs]} && $part != "$BOOT" && $part != "$AUTO_ROOT" ]] && select_mntopts "$fs"; then
|
if [[ $ignore -ne 2 && $fs && ${FS_OPTS[$fs]} && $part != "$BOOT" && $part != "$AUTO_ROOT" ]] && select_mntopts "$fs"; then
|
||||||
mount -o "$MNT_OPTS" "$part" "$mntpt" > /dev/null 2> "$ERR"
|
mount -o $MNT_OPTS "$part" "$mntpt" > /dev/null 2> "$ERR" || mount -o $MNT_OPTS "$part" "$mntpt" > /dev/null 2> "$ERR"
|
||||||
errshow 0 "mount -o '$MNT_OPTS' '$part' '$mntpt' > /dev/null" || return 1
|
errshow 0 "mount -o $MNT_OPTS $part $mntpt" || return 1
|
||||||
else
|
else
|
||||||
mount "$part" "$mntpt" > /dev/null 2> "$ERR"
|
mount "$part" "$mntpt" > /dev/null 2> "$ERR" || mount "$part" "$mntpt" > /dev/null 2> "$ERR"
|
||||||
errshow 0 "mount '$part' '$mntpt' > /dev/null" || return 1
|
errshow 0 "mount $part $mntpt" || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "$mntpt" /proc/mounts; then
|
if grep -q "$mntpt" /proc/mounts; then
|
||||||
@ -1105,11 +1105,19 @@ part_format()
|
|||||||
local delay="$3"
|
local delay="$3"
|
||||||
shift 3
|
shift 3
|
||||||
|
|
||||||
msg "File System Format" "\nFormatting $part as $fs\n" 0
|
if [[ $fs == 'f2fs' && -z $PF2FS ]]; then
|
||||||
mkfs.$fs ${FS_CMD_FLAGS[$fs]} "$part" > /dev/null 2> "$ERR" ||
|
modprobe f2fs
|
||||||
mkfs.$fs ${FS_CMD_FLAGS[$fs]} "$part" > /dev/null 2> "$ERR"
|
PF2FS=true
|
||||||
|
sleep 1
|
||||||
|
elif [[ $fs == 'btrfs' && -z $PBTRFS ]]; then
|
||||||
|
modprobe btrfs
|
||||||
|
PBTRFS=true
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
|
||||||
errshow 0 "mkfs.$fs ${FS_CMD_FLAGS[$fs]} '$part'" || return 1
|
msg "File System Format" "\nFormatting $part as $fs\n" 0
|
||||||
|
mkfs.$fs ${FS_CMD_FLAGS[$fs]} "$part" > /dev/null 2> "$ERR" || mkfs.$fs ${FS_CMD_FLAGS[$fs]} "$part" > /dev/null 2> "$ERR"
|
||||||
|
errshow 0 "mkfs.$fs ${FS_CMD_FLAGS[$fs]} $part" || return 1
|
||||||
sleep "$delay"
|
sleep "$delay"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1496,18 +1504,15 @@ select_filesystem()
|
|||||||
|
|
||||||
[[ $fs == 'skip' ]] && return 0
|
[[ $fs == 'skip' ]] && return 0
|
||||||
yesno "File System" "\nFormat $part as $fs?\n" || fs=''
|
yesno "File System" "\nFormat $part as $fs?\n" || fs=''
|
||||||
|
|
||||||
if [[ $fs == 'f2fs' ]]; then
|
|
||||||
modprobe f2fs
|
|
||||||
elif [[ $fs == 'btrfs' ]]; then
|
|
||||||
modprobe btrfs
|
|
||||||
BTRFS=1
|
|
||||||
yesno "Btrfs Subvolumes" "$_btrfs" && BTRFS=2
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
[[ $part == "$ROOT" ]] && ROOTFS=$fs
|
[[ $part == "$ROOT" ]] && ROOTFS=$fs
|
||||||
part_format "$part" "$fs" 0
|
part_format "$part" "$fs" 1
|
||||||
|
|
||||||
|
if [[ $fs == 'btrfs' ]]; then
|
||||||
|
BTRFS=1
|
||||||
|
yesno "Btrfs Subvolumes" "$_btrfs" && BTRFS=2
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
select_mountpoint()
|
select_mountpoint()
|
||||||
@ -3111,8 +3116,8 @@ errshow()
|
|||||||
[[ -r $DBG && $TERM == 'linux' ]] && less "$DBG"
|
[[ -r $DBG && $TERM == 'linux' ]] && less "$DBG"
|
||||||
die 1
|
die 1
|
||||||
fi
|
fi
|
||||||
dialog --backtitle "$DIST Installer - $SYS - v$VER" --title " Install Error " \
|
dialog --backtitle "$DIST Installer - $SYS - v$VER" --title " Install Error " --yes-label "Abort" --no-label "Continue" \
|
||||||
--yesno "${txt}Errors at this stage may not be serious depending on the command and error type.\n$_errchoice\n" 0 0
|
--yesno "${txt}Errors at this stage may not be serious depending on the command and error type.\n$_errchoice\n" 0 0 || return 0
|
||||||
|
|
||||||
tput civis
|
tput civis
|
||||||
return 1
|
return 1
|
||||||
|
Reference in New Issue
Block a user