use dhcpcd
This commit is contained in:
@@ -31,7 +31,7 @@ alpine-make-vm-image \
|
||||
--fs-skel-dir "$OVERLAY_DIR" \
|
||||
--fs-skel-chown root:root \
|
||||
--script-chroot \
|
||||
--packages "git curl docker cronie dhclient" \
|
||||
--packages "git curl docker cronie dhcpcd" \
|
||||
"$IMAGE_FILE" \
|
||||
"$CONFIGURE_SH" | tee $TMP
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ rc-update add acpid default
|
||||
rc-update add docker default
|
||||
rc-update add cronie default
|
||||
|
||||
step 'Adjust syslog'
|
||||
sed -i 's/^SYSLOGD_OPTS="\(.*\)"/SYSLOGD_OPTS="\1 -K"/' /etc/conf.d/syslog
|
||||
grep "SYSLOGD_OPTS" /etc/conf.d/syslog
|
||||
|
||||
step 'Clean up APK cache and documents'
|
||||
rm -rf /var/cache/apk/* || true
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
interface "eth0" {
|
||||
supersede routers GATEWAY_ADDRESS;
|
||||
}
|
||||
@@ -3,5 +3,8 @@ iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet manual
|
||||
post-up dhclient -v eth0
|
||||
pre-down dhclient -x eth0
|
||||
pre-up ip link set dev eth0 up
|
||||
up dhcpcd --nobackground --static routers=GATEWAY_ADDRESS eth0
|
||||
|
||||
down dhcpcd --release eth0
|
||||
post-down ip link set dev eth0 down
|
||||
|
||||
Reference in New Issue
Block a user