This commit is contained in:
Tobias Powalowski 2023-01-14 10:32:46 +01:00
parent 78b65101a2
commit 33d8bb2cf6
6 changed files with 11 additions and 11 deletions

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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