Verified Commit e189836d authored by Karel Koci's avatar Karel Koci 🤘 Committed by Karel Koci
Browse files

imgs/base-alpine: improve bootstrap script

This changes the order of setup. The original pretty much relied on
configuration change happening before service actually started and
system booted. This of course can't be ensured and is pretty fragile.

In general we can change file access or any file content without waiting
for system boot but once we want to communicate with services or to
access the Internet we need to wait for system to actually boot.

The clean effect here is the need to reload networking service once we
modify interfaces after boot. This should have always been there.
parent 1cee8784
......@@ -7,14 +7,17 @@
##################################################################################
set -e
# Modify configuration for expected network setup of NSFarm
sed -i 's/eth0/internet/g' /etc/network/interfaces
# Make wait scripts executable
for script in wait4boot wait4network; do
chmod +x "/bin/$script"
done
wait4boot
# Modify configuration for expected network setup of NSFarm
sed -i 's/eth0/internet/g' /etc/network/interfaces
rc-service networking restart
# Now extend system
wait4network
apk update
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment