summaryrefslogtreecommitdiff
path: root/recipes-core/set-hostname/files/set-hostname.service
blob: 9bd2a63f1ecaaa1aef8a50cc202501d1d19e8fac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
ConditionFileNotEmpty=|!/etc/hostname
Wants=network-pre.target
Before=network-pre.target
After=local-fs.target
After=sys-subsystem-net-devices-eth0.device

[Service]
Type=oneshot
ExecStart=/usr/bin/sethostname

[Install]
WantedBy=network.target