core: add option to suppress error logging if nm_utils_modprobe() fails

We don't want error logging for nm_platform_link_add() which
tries to load the bonding module. Later we will run tests as non-root,
where modprobe will fail. Logging an error would break the tests.
This commit is contained in:
Thomas Haller
2015-05-18 17:37:05 +02:00
parent 57958b93b6
commit 39f2b51abb
5 changed files with 23 additions and 8 deletions

View File

@@ -2439,7 +2439,7 @@ link_add (NMPlatform *platform,
* bond0 automatically.
*/
if (!g_file_test ("/sys/class/net/bonding_masters", G_FILE_TEST_EXISTS))
nm_utils_modprobe (NULL, "bonding", "max_bonds=0", NULL);
nm_utils_modprobe (NULL, TRUE, "bonding", "max_bonds=0", NULL);
}
debug ("link: add link '%s' of type '%s' (%d)",