Skip to content

Commit 0c2cdcd

Browse files
committed
keep networking packages for containers
1 parent bef95c9 commit 0c2cdcd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.build/images/dietpi-installer

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,22 @@ setenv rootuuid "true"' /boot/boot.cmd
863863
G_DIETPI-NOTIFY 2 'Marking all packages as auto-installed first, to allow effective autoremove afterwards'
864864
local apackages
865865
mapfile -t apackages < <(apt-mark showmanual)
866+
867+
# Containers: keep necessary packages to avoid losing network connectivity
868+
if [[ ${apackages[0]} && $G_HW_MODEL == 75 ]]
869+
then
870+
rpackages=(
871+
'ifupdown'
872+
'isc-dhcp-client'
873+
)
874+
apackages_string="${apackages[*]}"
875+
for pkg in "${apackages[@]}"
876+
do
877+
apackages_string=$(echo "$apackages_string" | sed "s/\b$pkg\b//g" | tr -s ' ')
878+
done
879+
IFS=' ' read -r -a apackages <<< "$apackages_string"
880+
fi
881+
866882
[[ ${apackages[0]} ]] && G_EXEC apt-mark auto "${apackages[@]}"
867883
unset -v apackages
868884

0 commit comments

Comments
 (0)