From cb68d924f752d9f0cfc2844e2d984730cdfe208e Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 6 Sep 2023 18:44:14 +0200 Subject: [PATCH] GRMLBASE/91-update-pciids: also ignore exit code 1 If the grml_chroot uses /etc/resolv.conf with a symlink pointing to /run/resolvconf/resolv.conf which might not exist, executing update-pciids fails. In the past, wget used to fail with exit code 4 (`Network failure` according to wget(1)). Nowadays we seem to get exit code 1 (`Generic error code`) instead. It behaves as such even if curl is present and gets prefered over wget. So let's also catch this error condition, to not fail a build because of that, but instead warn about it. --- etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids b/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids index 039c423..07666b1 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids +++ b/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids @@ -14,11 +14,11 @@ fi set -u bailout() { - if [ "${1:-}" = "4" ] ; then - echo "Warning: update-pciids returned with exit code 4." >&2 + if [ "${1:-}" = "4" ] || [ "${1:-}" = "1" ] ; then + echo "Warning: update-pciids returned with exit code ${1:-}." >&2 # be verbose in logs - echo "Warning: update-pciids returned with exit code 4." + echo "Warning: update-pciids returned with exit code ${1:-}." echo "-> This indicates that networking inside the chroot did not work" echo " while GRMLBASE/91-update-pciids was running." echo " To address this issue you can either configure /etc/resolv.conf" -- 2.1.4