Merge remote-tracking branch 'origin/github/pr/148'
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 91-update-pciids
index 373e00f..07666b1 100755 (executable)
@@ -14,11 +14,11 @@ fi
 set -u
 
 bailout() {
-  if [ "${1:-}" = "4" ] ; then
-    echo "Warning: freshclam 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: freshclam 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"
@@ -33,8 +33,8 @@ bailout() {
 
 [ -x $target/usr/bin/timeout ] && TIMEOUT="10" || TIMEOUT=""
 
-if ! [ -x $target/usr/bin/update-pciids ] ; then
-  echo "Warning: update-pciids not installed"
+if ! [ -x "${target}/usr/sbin/update-pciids" ] && ! [ -x "${target}/usr/bin/update-pciids" ] ; then
+  echo "Warning: update-pciids not installed (neither /usr/sbin/update-pciids nor /usr/bin/update-pciids exists"
   exit 0
 fi