summaryrefslogtreecommitdiff
path: root/recipes-core/set-hostname/files/set-hostname.service
blob: 306528b21a9b6203f9ad7b9d74a59769f493b649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[Unit]
ConditionPathExists=|!/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