mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00:00
Finalize refactor to new log macros, following-up to 37e3be9
This possible also mitigates the issue tracked in #307. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
dc547317c9
commit
d22dea74e3
30 files changed
+358
-353
No files matched your search
+6
-5
@@ -42,6 +42,7 @@
|
||||
|
||||
#include "finit.h"
|
||||
#include "helpers.h"
|
||||
#include "log.h"
|
||||
#include "private.h"
|
||||
#include "sig.h"
|
||||
#include "util.h"
|
||||
@@ -444,7 +445,7 @@ int mksubsys(const char *dir, mode_t mode, char *user, char *group)
|
||||
|
||||
rc = makedir(dir, mode);
|
||||
if (chown(dir, uid, gid))
|
||||
_pe("Failed chown(%s, %d, %d)", dir, uid, gid);
|
||||
err(1, "Failed chown(%s, %d, %d)", dir, uid, gid);
|
||||
}
|
||||
|
||||
umask(omask);
|
||||
@@ -482,7 +483,7 @@ void set_hostname(char **hostname)
|
||||
done:
|
||||
if (*hostname) {
|
||||
if (sethostname(*hostname, strlen(*hostname)))
|
||||
_pe("Failed sethostnaem(%s)", *hostname);
|
||||
err(1, "Failed sethostname(%s)", *hostname);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -496,9 +497,9 @@ void networking(int updown)
|
||||
return;
|
||||
|
||||
if (updown)
|
||||
_d("Setting up networking ...");
|
||||
dbg("Setting up networking ...");
|
||||
else
|
||||
_d("Taking down networking ...");
|
||||
dbg("Taking down networking ...");
|
||||
|
||||
/* Run user network start script if enabled */
|
||||
if (updown && network) {
|
||||
@@ -557,7 +558,7 @@ done:
|
||||
|
||||
/* Hooks that rely on loopback, or basic networking being up. */
|
||||
if (updown) {
|
||||
_d("Calling all network up hooks ...");
|
||||
dbg("Calling all network up hooks ...");
|
||||
plugin_run_hooks(HOOK_NETWORK_UP);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user