On some very basic installations (e.g. some container images) the
modprobe binary might be missing. If that is the case, don't fail
virkmodtest.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
*/
outbuf = virKModConfig();
if (!outbuf) {
- fprintf(stderr, "Failed to get config\n");
+ if (virFileIsExecutable(MODPROBE)) {
+ fprintf(stderr, "Failed to get config\n");
+ } else {
+ /* modprobe doesn't exist, do not claim error. */
+ ret = 0;
+ }
goto cleanup;
}
ret = 0;