Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions dracut/30ignition/coreos-hcloud-hostname.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=CoreOS Hetzner Cloud Hostname Agent
DefaultDependencies=false
Before=initrd.target
After=systemd-networkd.service initrd-root-fs.target
Wants=systemd-networkd.service initrd-root-fs.target
Comment thread
bgilbert marked this conversation as resolved.

[Service]
Type=oneshot
ExecStart=/usr/bin/coreos-metadata --cmdline --hostname=/sysroot/etc/hostname
4 changes: 4 additions & 0 deletions dracut/30ignition/ignition-generator
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ if [[ $(cmdline_arg coreos.oem.id) == "digitalocean" ]]; then
add_requires coreos-digitalocean-network.service
fi

if [[ $(cmdline_arg coreos.oem.id) == "hcloud" ]]; then
add_requires coreos-hcloud-hostname.service
Comment thread
bgilbert marked this conversation as resolved.
Outdated
fi

oem_id=pxe
if [[ $(systemd-detect-virt || true) =~ ^(kvm|qemu)$ ]]; then
oem_id=qemu
Expand Down
3 changes: 3 additions & 0 deletions dracut/30ignition/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ install() {
inst_simple "$moddir/coreos-digitalocean-network.service" \
"$systemdsystemunitdir/coreos-digitalocean-network.service"

inst_simple "$moddir/coreos-hcloud-hostname.service" \
"$systemdsystemunitdir/coreos-hcloud-hostname.service"

inst_simple "$moddir/coreos-static-network.service" \
"$systemdsystemunitdir/coreos-static-network.service"

Expand Down