mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 07:28:56 +08:00
core: 不使用 cloud-init 初始化系统
This commit is contained in:
26
fix-eth-name.initd
Normal file
26
fix-eth-name.initd
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user