chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hostname: set hostname early during boottime
[elogind.git]
/
main.c
diff --git
a/main.c
b/main.c
index b4fbdb58f5243027eef64ad5f5868b3ead27706c..139770edeccc5d230af7448277bd14bbd3c6e150 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-32,6
+32,8
@@
#include "manager.h"
#include "log.h"
#include "mount-setup.h"
#include "manager.h"
#include "log.h"
#include "mount-setup.h"
+#include "hostname-setup.h"
+#include "load-fragment.h"
static enum {
ACTION_RUN,
static enum {
ACTION_RUN,
@@
-293,6
+295,10
@@
int main(int argc, char *argv[]) {
log_debug("systemd running in %s mode.", manager_running_as_to_string(running_as));
log_debug("systemd running in %s mode.", manager_running_as_to_string(running_as));
+ if (running_as == MANAGER_INIT)
+ if (hostname_setup() < 0)
+ goto finish;
+
if ((r = manager_new(running_as, &m)) < 0) {
log_error("Failed to allocate manager object: %s", strerror(-r));
goto finish;
if ((r = manager_new(running_as, &m)) < 0) {
log_error("Failed to allocate manager object: %s", strerror(-r));
goto finish;