From 33d8bb2cf6577051cf6ee7356a1e977a943e41cc Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 14 Jan 2023 10:32:46 +0100 Subject: [PATCH] fix if --- usr/lib/archboot/installer/autoconfiguration.sh | 4 ++-- usr/lib/archboot/installer/base.sh | 4 ++-- usr/lib/archboot/installer/blockdevices.sh | 4 ++-- usr/lib/archboot/installer/bootloader.sh | 4 ++-- usr/lib/archboot/installer/common.sh | 4 ++-- usr/lib/archboot/installer/pacman.sh | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/usr/lib/archboot/installer/autoconfiguration.sh b/usr/lib/archboot/installer/autoconfiguration.sh index ada8bfc78..0550603e5 100644 --- a/usr/lib/archboot/installer/autoconfiguration.sh +++ b/usr/lib/archboot/installer/autoconfiguration.sh @@ -43,7 +43,7 @@ _auto_swap () { _auto_mdadm() { if [[ -e ${_DESTDIR}/etc/mdadm.conf ]]; then - i| grep -q ^md /proc/mdstat 2>/dev/null; then + if grep -q ^md /proc/mdstat 2>/dev/null; then _dialog --infobox "Enable mdadm settings on installed system ..." 3 70 mdadm -Ds >> "${_DESTDIR}"/etc/mdadm.conf fi @@ -63,7 +63,7 @@ _auto_network() fi _dialog --infobox "Enable network and proxy settings on installed system ..." 3 70 # copy iwd keys and enable iwd - i| grep -q 'wlan' /tmp/.network-interface; then + if grep -q 'wlan' /tmp/.network-interface; then cp -r /var/lib/iwd "${_DESTDIR}"/var/lib chroot "${_DESTDIR}" systemctl enable iwd >"${_NO_LOG}" fi diff --git a/usr/lib/archboot/installer/base.sh b/usr/lib/archboot/installer/base.sh index edae05cb0..2c7b14e04 100644 --- a/usr/lib/archboot/installer/base.sh +++ b/usr/lib/archboot/installer/base.sh @@ -4,7 +4,7 @@ _ANSWER="/tmp/.setup" # use the first VT not dedicated to a running console # don't use _DESTDIR=/mnt because it's intended to mount other things there! # check first if bootet in archboot -i| grep -qw archboot /etc/hostname; then +if grep -qw archboot /etc/hostname; then _DESTDIR="/install" else _DESTDIR="/" @@ -85,7 +85,7 @@ _set_uefi_parameters() { _UEFI_SECURE_BOOT=1 fi if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then - i| grep -q '_IA32_UEFI=1' /proc/cmdline; then + if grep -q '_IA32_UEFI=1' /proc/cmdline; then _EFI_MIXED=1 _UEFI_ARCH="IA32" _SPEC_UEFI_ARCH="ia32" diff --git a/usr/lib/archboot/installer/blockdevices.sh b/usr/lib/archboot/installer/blockdevices.sh index f21384aa2..644af3bc4 100644 --- a/usr/lib/archboot/installer/blockdevices.sh +++ b/usr/lib/archboot/installer/blockdevices.sh @@ -311,7 +311,7 @@ _umountall() _stopmd() { - i| grep -q ^md /proc/mdstat 2>/dev/null; then + if grep -q ^md /proc/mdstat 2>/dev/null; then _DISABLEMD="" _dialog --defaultno --yesno "Setup detected already running raid devices, do you want to disable them completely?" 0 0 && _DISABLEMD=1 if [[ -n "${_DISABLEMD}" ]]; then @@ -495,7 +495,7 @@ _raid() while [[ -z "${_RAIDDEVICE}" ]]; do _dialog --inputbox "Enter the node name for the raiddevice:\n/dev/md[number]\n/dev/md0\n/dev/md1\n\n" 12 50 "/dev/md0" 2>"${_ANSWER}" || return 1 _RAIDDEVICE=$(cat "${_ANSWER}") - i| grep -q "^${_RAIDDEVICE//\/dev\//}" /proc/mdstat; then + if grep -q "^${_RAIDDEVICE//\/dev\//}" /proc/mdstat; then _dialog --msgbox "ERROR: You have defined 2 identical node names! Please enter another name." 8 65 _RAIDDEVICE="" fi diff --git a/usr/lib/archboot/installer/bootloader.sh b/usr/lib/archboot/installer/bootloader.sh index 2f540e514..674553292 100644 --- a/usr/lib/archboot/installer/bootloader.sh +++ b/usr/lib/archboot/installer/bootloader.sh @@ -69,11 +69,11 @@ _getrootfslabel() { _freeze_xfs() { sync if [[ -x /usr/bin/xfs_freeze ]]; then - i| grep -q "${_DESTDIR}/boot " /proc/mounts | grep -q " xfs "; then + if grep -q "${_DESTDIR}/boot " /proc/mounts | grep -q " xfs "; then xfs_freeze -f "${_DESTDIR}"/boot >"${_NO_LOG}" xfs_freeze -u "${_DESTDIR}"/boot >"${_NO_LOG}" fi - i| grep -q "${_DESTDIR} " /proc/mounts | grep -q " xfs "; then + if grep -q "${_DESTDIR} " /proc/mounts | grep -q " xfs "; then xfs_freeze -f "${_DESTDIR}" >"${_NO_LOG}" xfs_freeze -u "${_DESTDIR}" >"${_NO_LOG}" fi diff --git a/usr/lib/archboot/installer/common.sh b/usr/lib/archboot/installer/common.sh index 3e81f3153..3bd24936f 100644 --- a/usr/lib/archboot/installer/common.sh +++ b/usr/lib/archboot/installer/common.sh @@ -51,7 +51,7 @@ _marvell_firmware() { # prepares target system as a chroot _chroot_mount() { - i| grep -qw archboot /etc/hostname; then + if grep -qw archboot /etc/hostname; then [[ -e "${_DESTDIR}/proc" ]] || mkdir -m 555 "${_DESTDIR}/proc" [[ -e "${_DESTDIR}/sys" ]] || mkdir -m 555 "${_DESTDIR}/sys" [[ -e "${_DESTDIR}/dev" ]] || mkdir -m 755 "${_DESTDIR}/dev" @@ -67,7 +67,7 @@ _chroot_mount() # tears down chroot in target system _chroot_umount() { - i| grep -qw archboot /etc/hostname; then + if grep -qw archboot /etc/hostname; then umount -R "${_DESTDIR}/proc" umount -R "${_DESTDIR}/sys" umount -R "${_DESTDIR}/dev" diff --git a/usr/lib/archboot/installer/pacman.sh b/usr/lib/archboot/installer/pacman.sh index 8aac26f17..b513abafa 100644 --- a/usr/lib/archboot/installer/pacman.sh +++ b/usr/lib/archboot/installer/pacman.sh @@ -25,7 +25,7 @@ _select_mirror() { if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then dialog --infobox "Downloading latest mirrorlist ..." 3 40 ${_DLPROG} "https://www.archlinux.org/mirrorlist/?country=all&protocol=http&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on" -O /tmp/pacman_mirrorlist.txt - i| grep -q '#Server = http:' /tmp/pacman_mirrorlist.txt; then + if grep -q '#Server = http:' /tmp/pacman_mirrorlist.txt; then mv "${_MIRRORLIST}" "${_MIRRORLIST}.bak" cp /tmp/pacman_mirrorlist.txt "${_MIRRORLIST}" fi