FS#36264 - [systemd] Add /etc/hostname to initcpio hook
Attached to Project:
Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Wednesday, 24 July 2013, 16:34 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 13 August 2013, 16:46 GMT
Opened by Gerardo Exequiel Pozzi (djgera) - Wednesday, 24 July 2013, 16:34 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 13 August 2013, 16:46 GMT
|
Details
Description: Add /etc/hostname to initcpio hook otherwise
all things are logged to journal with default "localhost"
-- add_file /etc/hostname -- Example: Jul 24 13:25:10 localhost kernel: Linux version 3.10.2-1-ARCH (tobias@T-POWA-LX)... Example (fixed): Jul 24 13:30:35 archbase kernel: Linux version 3.10.2-1-ARCH (tobias@T-POWA-LX)... Additional info: systemd-206-1 |
This task depends upon
Closed by Dave Reisner (falconindy)
Tuesday, 13 August 2013, 16:46 GMT
Reason for closing: Won't fix
Additional comments about closing: See discussion in comments. Not really anything to do here.
Tuesday, 13 August 2013, 16:46 GMT
Reason for closing: Won't fix
Additional comments about closing: See discussion in comments. Not really anything to do here.
...snipped...
Jul 24 12:07:27 localhost kernel: ata2.00: configured for MWDMA2
Jul 24 12:07:27 localhost kernel: scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 1.5. PQ: 0 ANSI: 5
Jul 24 12:07:27 localhost systemd[1]: Started Cleanup udevd DB.
Jul 24 12:07:27 localhost systemd[1]: Starting Switch Root.
Jul 24 12:07:27 localhost systemd[1]: Reached target Switch Root.
Jul 24 12:07:27 localhost systemd[1]: Starting Switch Root...
Jul 24 12:07:27 localhost systemd[1]: Switching root.
Jul 24 12:07:27 localhost systemd-journal[53]: Journal stopped
Jul 24 12:07:27 beatbox systemd-journal[135]: Runtime journal is using 184.0K (max 49.9M, leaving 74.8M of free 498.5M, current limit 49.9M).
Jul 24 12:07:27 beatbox systemd-journal[135]: Runtime journal is using 188.0K (max 49.9M, leaving 74.8M of free 498.5M, current limit 49.9M).
Jul 24 12:07:27 beatbox systemd-journald[53]: Received SIGTERM
Jul 24 12:07:27 beatbox kernel: FS-Cache: Loaded
Jul 24 12:07:27 beatbox systemd-journal[135]: Journal started
Jul 24 12:07:27 beatbox systemd-cgroups-agent[119]: Failed to get D-Bus connection: Failed to connect to socket /run/systemd/private: No such file or directory
Jul 24 12:07:27 beatbox systemd[1]: systemd 206 running in system mode. (+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
Jul 24 12:07:27 beatbox systemd[1]: Detected virtualization 'kvm'.
Jul 24 12:07:27 beatbox systemd[1]: Set hostname to <beatbox>.
...snipped...
If this is going to be fixed, I think the right thing to do is give early userspace a static hostname of "initramfs".
If no /etc/hostname is added I agree in setting up at least "initramfs" or in bad words commonly used "initrd" (to be consistent in how systemd calls initramfs)
As to a default hostname in the initrd: I don't have anything against it, but I'm not sure I see the benefit either...? Anyway, maybe this should be done in systemd (if it should be done at all). I.e., if in the initrd and no hostname is set, set it to "initrd", or something like that?