The "ejbca.sh ca importprofiles" command currently does not use different return codes for if the import of profiles succeeded or not. Unless there was an error with the output directory or an authorization issue the return code is always SUCCESS(0) even if the import failed for some or all profiles.
Change the importprofiles command so that it only returns SUCCESS(0) if all profiles where imported successfully and use FUNCTIONAL_FAILURE(1) for if any import failed.
Bonus points if the command could use other return codes for the cases:
"imported but with warnings" and "partial imported" etc.
See support ticket for background.