mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
replace > /dev/null 2>&1 with _NO_LOG
This commit is contained in:
parent
f3207cd46a
commit
a3ce7ab754
5 changed files with 25 additions and 24 deletions
|
@ -56,14 +56,14 @@ _autoprepare() {
|
|||
fi
|
||||
while [[ -z "${_DEFAULTFS}" ]]; do
|
||||
_FSOPTS=""
|
||||
command -v mkfs.btrfs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} btrfs Btrfs"
|
||||
command -v mkfs.ext4 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} ext4 Ext4"
|
||||
command -v mkfs.ext3 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} ext3 Ext3"
|
||||
command -v mkfs.ext2 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} ext2 Ext2"
|
||||
command -v mkfs.xfs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} xfs XFS"
|
||||
command -v mkfs.f2fs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} f2fs F2FS"
|
||||
command -v mkfs.nilfs2 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} nilfs2 Nilfs2"
|
||||
command -v mkfs.jfs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} jfs JFS"
|
||||
command -v mkfs.btrfs ${_NO_LOG} && _FSOPTS="${_FSOPTS} btrfs Btrfs"
|
||||
command -v mkfs.ext4 ${_NO_LOG} && _FSOPTS="${_FSOPTS} ext4 Ext4"
|
||||
command -v mkfs.ext3 ${_NO_LOG} && _FSOPTS="${_FSOPTS} ext3 Ext3"
|
||||
command -v mkfs.ext2 ${_NO_LOG} && _FSOPTS="${_FSOPTS} ext2 Ext2"
|
||||
command -v mkfs.xfs ${_NO_LOG} && _FSOPTS="${_FSOPTS} xfs XFS"
|
||||
command -v mkfs.f2fs ${_NO_LOG} && _FSOPTS="${_FSOPTS} f2fs F2FS"
|
||||
command -v mkfs.nilfs2 ${_NO_LOG} && _FSOPTS="${_FSOPTS} nilfs2 Nilfs2"
|
||||
command -v mkfs.jfs ${_NO_LOG} && _FSOPTS="${_FSOPTS} jfs JFS"
|
||||
# create 1 MB bios_grub partition for grub BIOS GPT support
|
||||
if [[ -n "${_GUIDPARAMETER}" ]]; then
|
||||
_GUID_DEVICE_SIZE="2"
|
||||
|
|
|
@ -9,11 +9,12 @@ if grep -qw archboot /etc/hostname; then
|
|||
else
|
||||
_DESTDIR="/"
|
||||
fi
|
||||
if pgrep -x Xorg > /dev/null 2>&1; then
|
||||
if pgrep -x Xorg ${_NO_LOG}; then
|
||||
_LOG="/dev/tty8"
|
||||
else
|
||||
_LOG="/dev/tty7"
|
||||
fi
|
||||
_NO_LOG="> /dev/null 2>&1"
|
||||
_VC_NUM="$(basename ${_LOG} | sed -e 's#tty##g')"
|
||||
_VC="VC${_VC_NUM}"
|
||||
# install stages
|
||||
|
|
|
@ -46,15 +46,15 @@ _ssd_optimization() {
|
|||
_select_filesystem() {
|
||||
# don't allow vfat as / filesystem, it will not work!
|
||||
_FSOPTS=""
|
||||
command -v mkfs.btrfs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} btrfs Btrfs"
|
||||
command -v mkfs.ext4 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} ext4 Ext4"
|
||||
command -v mkfs.ext3 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} ext3 Ext3"
|
||||
command -v mkfs.ext2 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} ext2 Ext2"
|
||||
command -v mkfs.vfat > /dev/null 2>&1 && [[ -z "${_DO_ROOT}" ]] && _FSOPTS="${_FSOPTS} vfat FAT32"
|
||||
command -v mkfs.xfs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} xfs XFS"
|
||||
command -v mkfs.f2fs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} f2fs F2FS"
|
||||
command -v mkfs.nilfs2 > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} nilfs2 Nilfs2"
|
||||
command -v mkfs.jfs > /dev/null 2>&1 && _FSOPTS="${_FSOPTS} jfs JFS"
|
||||
command -v mkfs.btrfs ${_NO_LOG} && _FSOPTS="${_FSOPTS} btrfs Btrfs"
|
||||
command -v mkfs.ext4 ${_NO_LOG} && _FSOPTS="${_FSOPTS} ext4 Ext4"
|
||||
command -v mkfs.ext3 ${_NO_LOG} && _FSOPTS="${_FSOPTS} ext3 Ext3"
|
||||
command -v mkfs.ext2 ${_NO_LOG} && _FSOPTS="${_FSOPTS} ext2 Ext2"
|
||||
command -v mkfs.vfat ${_NO_LOG} && [[ -z "${_DO_ROOT}" ]] && _FSOPTS="${_FSOPTS} vfat FAT32"
|
||||
command -v mkfs.xfs ${_NO_LOG} && _FSOPTS="${_FSOPTS} xfs XFS"
|
||||
command -v mkfs.f2fs ${_NO_LOG} && _FSOPTS="${_FSOPTS} f2fs F2FS"
|
||||
command -v mkfs.nilfs2 ${_NO_LOG} && _FSOPTS="${_FSOPTS} nilfs2 Nilfs2"
|
||||
command -v mkfs.jfs ${_NO_LOG} && _FSOPTS="${_FSOPTS} jfs JFS"
|
||||
#shellcheck disable=SC2086
|
||||
_dialog --menu "Select a filesystem for ${_DEVICE}:" 16 50 13 ${_FSOPTS} 2>"${_ANSWER}" || return 1
|
||||
_FSTYPE=$(cat "${_ANSWER}")
|
||||
|
|
|
@ -30,9 +30,9 @@ _do_wireless() {
|
|||
_WLAN_AUTH=""
|
||||
if [[ "${_CONNECTION}" == "wireless" ]]; then
|
||||
# disconnect the interface first!
|
||||
iwctl station "${_INTERFACE}" disconnect > /dev/null 2>&1
|
||||
iwctl station "${_INTERFACE}" disconnect ${_NO_LOG}
|
||||
# clean old keys first!
|
||||
rm -f /var/lib/iwd/* > /dev/null 2>&1
|
||||
rm -f /var/lib/iwd/* ${_NO_LOG}
|
||||
#shellcheck disable=SC2086,SC2046
|
||||
_dialog --menu "Choose your SSID:\n(Empty spaces in your SSID are replaced by '+' char)" 14 60 7 \
|
||||
$(_essid_scan _) \
|
||||
|
@ -61,9 +61,9 @@ _do_wireless() {
|
|||
_dialog --infobox "Connection to SSID='${_WLAN_SSID}' with interface ${_INTERFACE} ..." 3 70
|
||||
_printk off
|
||||
if [[ -z "${_WLAN_KEY}" ]]; then
|
||||
iwctl station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" > /dev/null 2>&1 && _WLAN_AUTH=1
|
||||
iwctl station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" ${_NO_LOG} && _WLAN_AUTH=1
|
||||
else
|
||||
iwctl --passphrase="${_WLAN_KEY}" station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" > /dev/null 2>&1 && _WLAN_AUTH=1
|
||||
iwctl --passphrase="${_WLAN_KEY}" station "${_INTERFACE}" "${_WLAN_CONNECT}" "${_WLAN_SSID}" ${_NO_LOG} && _WLAN_AUTH=1
|
||||
fi
|
||||
if [[ -n "${_WLAN_AUTH}" ]]; then
|
||||
_dialog --infobox "Authentification successfull. Continuing in 3 seconds ..." 3 70
|
||||
|
|
|
@ -118,11 +118,11 @@ _prepare_pacman() {
|
|||
[[ ! -d "${_DESTDIR}/var/lib/pacman" ]] && mkdir -p "${_DESTDIR}/var/lib/pacman"
|
||||
_dialog --infobox "Waiting for Arch Linux keyring initialization ..." 3 40
|
||||
# pacman-key process itself
|
||||
while pgrep -x pacman-key > /dev/null 2>&1; do
|
||||
while pgrep -x pacman-key ${_NO_LOG}; do
|
||||
sleep 1
|
||||
done
|
||||
# gpg finished in background
|
||||
while pgrep -x gpg > /dev/null 2>&1; do
|
||||
while pgrep -x gpg ${_NO_LOG}; do
|
||||
sleep 1
|
||||
done
|
||||
[[ -e /etc/systemd/system/pacman-init.service ]] && systemctl stop pacman-init.service
|
||||
|
|
Loading…
Reference in a new issue