core: 不使用 cloud-init 初始化系统

This commit is contained in:
bin456789
2025-01-10 00:43:26 +08:00
parent abdbf03eb0
commit 4149cf2e6e
7 changed files with 770 additions and 124 deletions

27
fix-eth-name.service Normal file
View File

@ -0,0 +1,27 @@
[Unit]
Description=Fix Eth Name
ConditionPathExists=/fix-eth-name.sh
After=dbus.service
Before=cloud-init-local.service
Before=network.service
Before=networking.service
Before=systemd-networkd.service
Before=NetworkManager.service
Before=wickedd-auto4.service
Before=wickedd-dhcp4.service
Before=wickedd-dhcp6.service
Before=wickedd.service
Before=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/env bash /fix-eth-name.sh
ExecStart=/usr/bin/env rm -f /fix-eth-name.sh
ExecStart=/usr/bin/env rm -f /etc/systemd/system/fix-eth-name.service
ExecStart=/usr/bin/env rm -f /etc/systemd/system/multi-user.target.wants/fix-eth-name.service
[Install]
WantedBy=multi-user.target