From 2378f0371e99a336dabff9a1f694896e6ee1360e Mon Sep 17 00:00:00 2001 From: Philipp Panzer <4118161+yodaaut@users.noreply.github.com> Date: Fri, 11 Aug 2023 20:30:50 +0200 Subject: [PATCH 1/3] keep networking packages for containers --- .build/images/dietpi-installer | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 440f046afd..218b0549d8 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -863,6 +863,22 @@ setenv rootuuid "true"' /boot/boot.cmd G_DIETPI-NOTIFY 2 'Marking all packages as auto-installed first, to allow effective autoremove afterwards' local apackages mapfile -t apackages < <(apt-mark showmanual) + + # Containers: keep necessary packages to avoid losing network connectivity + if [[ ${apackages[0]} && $G_HW_MODEL == 75 ]] + then + rpackages=( + 'ifupdown' + 'isc-dhcp-client' + ) + apackages_string="${apackages[*]}" + for pkg in "${apackages[@]}" + do + apackages_string=$(echo "$apackages_string" | sed "s/\b$pkg\b//g" | tr -s ' ') + done + IFS=' ' read -r -a apackages <<< "$apackages_string" + fi + [[ ${apackages[0]} ]] && G_EXEC apt-mark auto "${apackages[@]}" unset -v apackages From 3dab2d86101b3169e7c1fa0c5648b95b7b4f3ddc Mon Sep 17 00:00:00 2001 From: Philipp Panzer <4118161+yodaaut@users.noreply.github.com> Date: Mon, 28 Aug 2023 22:55:49 +0200 Subject: [PATCH 2/3] fix typo --- .build/images/dietpi-installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 218b0549d8..a6f9e45bfb 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -872,7 +872,7 @@ setenv rootuuid "true"' /boot/boot.cmd 'isc-dhcp-client' ) apackages_string="${apackages[*]}" - for pkg in "${apackages[@]}" + for pkg in "${rpackages[@]}" do apackages_string=$(echo "$apackages_string" | sed "s/\b$pkg\b//g" | tr -s ' ') done From 8376cc5ee155510137b01aaa1a738dada8395645 Mon Sep 17 00:00:00 2001 From: Philipp Panzer <4118161+yodaaut@users.noreply.github.com> Date: Thu, 23 May 2024 01:35:56 +0200 Subject: [PATCH 3/3] add container variants --- .build/images/dietpi-installer | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index a6f9e45bfb..3ff37c4206 100755 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -450,7 +450,8 @@ _EOF_ esac G_WHIP_MENU_ARRAY+=( '' '●─ Other ' - '75' ': Container image' + '75.1' ': Container image without network' + '75.2' ': Container image with network' '22' ': Generic device' ) @@ -864,8 +865,8 @@ setenv rootuuid "true"' /boot/boot.cmd local apackages mapfile -t apackages < <(apt-mark showmanual) - # Containers: keep necessary packages to avoid losing network connectivity - if [[ ${apackages[0]} && $G_HW_MODEL == 75 ]] + # Containers with network: keep necessary packages to avoid losing network connectivity + if [[ ${apackages[0]} && $G_HW_MODEL == 75 && $HW_VARIANT == 2 ]] then rpackages=( 'ifupdown'