diff --git a/buildroot-external/rootfs-overlay/usr/libexec/docker-failure b/buildroot-external/rootfs-overlay/usr/libexec/docker-failure index 493b00d71..1fa126641 100755 --- a/buildroot-external/rootfs-overlay/usr/libexec/docker-failure +++ b/buildroot-external/rootfs-overlay/usr/libexec/docker-failure @@ -2,10 +2,10 @@ if [ "$SERVICE_RESULT" = "exit-code" ] && [ "$EXIT_STATUS" = "1" ]; then echo "Docker exited with exit status 1, this might be caused by corrupted key.json." - size=$(stat -c %s "/etc/docker/key.json") + size=$(stat -c %s "/mnt/overlay/etc/docker/key.json") echo "key.json: ${size} bytes" - if ! jq < "/etc/docker/key.json" > /dev/null || [ "${size}" -eq 0 ]; then + if ! jq -e < "/mnt/overlay/etc/docker/key.json" > /dev/null || [ "${size}" -eq 0 ]; then echo "key.json appears to be corrupted, it is not parsable. Removing it." - rm -f "/etc/docker/key.json" + rm -f "/mnt/overlay/etc/docker/key.json" fi fi