The check only cares about whether the module is installed, not enabled.
But installation we should know anyway, after all we ship the module
with systemd these days...
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#include <dlfcn.h>
#include <sys/utsname.h>
#include "util.h"
return 0;
}
-static bool check_nss(void) {
- void *dl;
-
- dl = dlopen("libnss_myhostname.so.2", RTLD_LAZY);
- if (dl) {
- dlclose(dl);
- return true;
- }
-
- return false;
-}
-
static bool valid_chassis(const char *chassis) {
assert(chassis);
goto finish;
}
- if (!check_nss())
- log_warning("Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!");
-
if (argc != 1) {
log_error("This program takes no arguments.");
r = -EINVAL;