When installing on my Raspberry Pi 4 Model B, the mirror I selected (Sydney) was missing one package out of the base-addons install, so the "pacman -S command failed because of a 404 error on the missing package on the mirror.
The "ok_nok" function call after the "if...then...else" code block didn't catch it as failed, however, I think because the "systemctl enable dhcpcd.service" command that is after the pacman command and before the ok_nok call succeeded.
So, I have changed the commands in the "if...then...else" code block to be in a single line with logical AND between each, so that this (albeit unlikely!) edge case is handled correctly.
When installing on my Raspberry Pi 4 Model B, the mirror I selected (Sydney) was missing one package out of the base-addons install, so the "pacman -S command failed because of a 404 error on the missing package on the mirror.
The "ok_nok" function call after the "if...then...else" code block didn't catch it as failed, however, I think because the "systemctl enable dhcpcd.service" command that is after the pacman command and before the ok_nok call succeeded.
So, I have changed the commands in the "if...then...else" code block to be in a single line with logical AND between each, so that this (albeit unlikely!) edge case is handled correctly.