Skip to content

Commit

Permalink
dietpi: test quicker firstboot
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Dec 22, 2024
1 parent c3fb032 commit 084b93b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/build_dist
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,24 @@ EOF
# reduce the timeout for acquiring a dhcp lease, this makes dietpi networking less painful (default 60s)
echo "timeout 30;" >> "$MNT_DIR"/etc/dhcp/dhclient.conf

# make firstboot quicker
patch "$MNT_DIR"/var/lib/dietpi/services/dietpi-firstboot.bash <<FEO
@@ -352,8 +352,9 @@ _EOF_
# - Configure enabled interfaces now, /etc/network/interfaces will be effective from next boot on
# Failsafe: Bring up Ethernet, whenever WiFi is disabled or fails to be configured, e.g. due to wrong credentials
# shellcheck disable=SC2015
- (( $wifi_enabled )) && ifup "$iface_wlan"
- (( $ethernet_enabled )) && ifup "$iface_eth"
+ (( $wifi_enabled )) && ifup "$iface_wlan" &
+ (( $ethernet_enabled )) && ifup "$iface_eth" &
+ wait
# - Boot wait for network
/boot/dietpi/func/dietpi-set_software boot_wait_for_network "$(( ! $(grep -cm1 '^[[:blank:]]*AUTO_SETUP_BOOT_WAIT_FOR_NETWORK=0' /boot/dietpi.txt) ))"
FEO



sed -i "s/ADSB_RANDOM_PASSWORD/$ROOT_PWD/" "${DIR}/variants/dietpi/dietpi.txt"
echo "AUTO_SETUP_SSH_PUBKEY=$SSH_PUB_KEY" >> "${DIR}/variants/dietpi/dietpi.txt"
cp "${DIR}/variants/dietpi/dietpi.txt" "$MNT_DIR"/"$CONFIG_DIR"
Expand Down

0 comments on commit 084b93b

Please sign in to comment.