Skip to content

Commit 63320ff

Browse files
committed
force latest conf file for new packages if asked in doubt
Signed-off-by: Markus Storm <markus.storm@gmx.net>
1 parent caf1470 commit 63320ff

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

functions/java-jre.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ adoptium_fetch_apt() {
3838
echo "deb [signed-by=/usr/share/keyrings/${keyName}.gpg] https://packages.adoptium.net/artifactory/deb ${osrelease:-bookworm} main" > /etc/apt/sources.list.d/adoptium.list
3939

4040
if ! cond_redirect apt-get update; then echo "FAILED (update apt lists)"; return 1; fi
41-
if ! cond_redirect dpkg --configure -a; then echo "FAILED (dpkg)"; return 1; fi
41+
if ! cond_redirect dpkg --configure -a --force-confnew; then echo "FAILED (dpkg)"; return 1; fi
4242
if cond_redirect apt-get install --download-only --yes "temurin-${1}-jre"; then echo "OK"; else echo "FAILED"; return 1; fi
4343
}
4444

@@ -79,10 +79,10 @@ openjdk_fetch_apt() {
7979
echo -e "Package: *\\nPin: release a=unstable\\nPin-Priority: 90\\n" > /etc/apt/preferences.d/limit-unstable
8080
if ! cond_redirect apt-get update; then echo "FAILED (update apt lists)"; return 1; fi
8181

82-
if ! cond_redirect dpkg --configure -a; then echo "FAILED (dpkg)"; return 1; fi
82+
if ! cond_redirect dpkg --configure -a --force-confnew; then echo "FAILED (dpkg)"; return 1; fi
8383
if cond_redirect apt-get install --download-only --yes -t unstable "openjdk-${1}-jre-headless"; then echo "OK"; else echo "FAILED (download)"; return 1; fi
8484
else
85-
if ! cond_redirect dpkg --configure -a; then echo "FAILED (dpkg)"; return 1; fi
85+
if ! cond_redirect dpkg --configure -a --force-confnew; then echo "FAILED (dpkg)"; return 1; fi
8686
if cond_redirect apt-get install --download-only --yes "openjdk-${1}-jre-headless"; then echo "OK"; else echo "FAILED (download)"; return 1; fi
8787
fi
8888
}

functions/openhab.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ openhab_setup() {
7272
rm -f /etc/apt/sources.list.d/openhab*.list
7373
echo "$repo" > /etc/apt/sources.list.d/openhab.list
7474

75-
dpkg --configure -a
75+
dpkg --configure -a --force-confnew
7676
echo -n "$(timestamp) [openHABian] Installing openHAB... "
7777
if ! apt-get clean --yes -o DPkg::Lock::Timeout="$APTTIMEOUT"; then echo "FAILED (apt cache clean)"; return 1; fi
7878
cond_redirect apt-get update -o DPkg::Lock::Timeout="$APTTIMEOUT"

functions/system.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ system_upgrade() {
4747
##
4848
basic_packages() {
4949
echo -n "$(timestamp) [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... "
50-
dpkg --configure -a # just in case to ensure apt works
50+
dpkg --configure -a --force-confnew # just in case to ensure apt works
5151

5252
if cond_redirect apt-get -o DPkg::Lock::Timeout="$APTTIMEOUT" install --yes acl arping apt-utils bash-completion bzip2 coreutils \
5353
curl dirmngr git htop man-db mc multitail nano nmap lsb-release screen software-properties-common \

functions/wifi.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ setup_hotspot() {
140140
# shellcheck disable=SC2154
141141
sed -i -e "s|ap_password:.*$|ap_password: ${hotspotpw}|g" /etc/comitup.conf
142142

143-
DEBIAN_FRONTEND=noninteractive dpkg --configure -a &>/dev/null
143+
DEBIAN_FRONTEND=noninteractive dpkg --configure -a --force-confnew &>/dev/null
144144
DEBIAN_FRONTEND=noninteractive apt install --yes -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' comitup &>/dev/null
145145
systemctl enable --now comitup
146146
comitup-cli d

0 commit comments

Comments
 (0)