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

26
fix-eth-name.initd Normal file
View File

@ -0,0 +1,26 @@
#!/sbin/openrc-run
Description="Fix Eth Name"
# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/openrc/networking.initd
# https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/dhcpcd/dhcpcd.initd
depend() {
need localmount
want dev-settle
after bootmisc hwdrivers modules
before net networking dhcpcd
}
start() {
ebegin "Fix Eth Name"
ash /fix-eth-name.sh
eend $?
}
start_post() {
rc-service fix-eth-name zap
rc-update del fix-eth-name boot
rm -f /etc/init.d/fix-eth-name
rm -f /fix-eth-name.sh
}