Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions functions/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -333,21 +333,27 @@ is_raspios() {
}
# Represents the current OS versions we officially support
is_supported() {
if is_bullseye || is_bookworm || is_jellyfish || is_noble; then return 0; fi
if is_bullseye || is_bookworm || is_trixie || is_jellyfish || is_noble; then return 0; fi
return 1;
}
# Debian/Raspbian oldstable
# Debian/Raspbian oldoldstable
is_bullseye() {
if [[ "$osrelease" == "bullseye" ]]; then return 0; fi
[[ $(cat /etc/*release*) =~ "bullseye" ]]
return $?
}
# Debian/Raspbian stable
# Debian/Raspbian oldstable
is_bookworm() {
if [[ "$osrelease" == "bookworm" ]]; then return 0; fi
[[ $(cat /etc/*release*) =~ "bookworm" ]]
return $?
}
# Debian/Raspbian stable
is_trixie() {
if [[ "$osrelease" == "trixie" ]]; then return 0; fi
[[ $(cat /etc/*release*) =~ "trixie" ]]
return $?
}
# Debian/Raspbian unstable
is_sid() {
if [[ "$osrelease" == "sid" ]]; then return 0; fi
Expand Down
6 changes: 3 additions & 3 deletions functions/java-jre.bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ adoptium_fetch_apt() {
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

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

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

if ! cond_redirect dpkg --configure -a; then echo "FAILED (dpkg)"; return 1; fi
if ! cond_redirect dpkg --configure -a --force-confnew; then echo "FAILED (dpkg)"; return 1; fi
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
else
if ! cond_redirect dpkg --configure -a; then echo "FAILED (dpkg)"; return 1; fi
if ! cond_redirect dpkg --configure -a --force-confnew; then echo "FAILED (dpkg)"; return 1; fi
if cond_redirect apt-get install --download-only --yes "openjdk-${1}-jre-headless"; then echo "OK"; else echo "FAILED (download)"; return 1; fi
fi
}
Expand Down
2 changes: 1 addition & 1 deletion functions/openhab.bash
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ openhab_setup() {
rm -f /etc/apt/sources.list.d/openhab*.list
echo "$repo" > /etc/apt/sources.list.d/openhab.list

dpkg --configure -a
dpkg --configure -a --force-confnew
echo -n "$(timestamp) [openHABian] Installing openHAB... "
if ! apt-get clean --yes -o DPkg::Lock::Timeout="$APTTIMEOUT"; then echo "FAILED (apt cache clean)"; return 1; fi
cond_redirect apt-get update -o DPkg::Lock::Timeout="$APTTIMEOUT"
Expand Down
2 changes: 1 addition & 1 deletion functions/system.bash
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ system_upgrade() {
##
basic_packages() {
echo -n "$(timestamp) [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... "
dpkg --configure -a # just in case to ensure apt works
dpkg --configure -a --force-confnew # just in case to ensure apt works

if cond_redirect apt-get -o DPkg::Lock::Timeout="$APTTIMEOUT" install --yes acl arping apt-utils bash-completion bzip2 coreutils \
curl dirmngr git htop man-db mc multitail nano nmap lsb-release screen software-properties-common \
Expand Down
2 changes: 1 addition & 1 deletion functions/wifi.bash
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ setup_hotspot() {
# shellcheck disable=SC2154
sed -i -e "s|ap_password:.*$|ap_password: ${hotspotpw}|g" /etc/comitup.conf

DEBIAN_FRONTEND=noninteractive dpkg --configure -a &>/dev/null
DEBIAN_FRONTEND=noninteractive dpkg --configure -a --force-confnew &>/dev/null
DEBIAN_FRONTEND=noninteractive apt install --yes -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' comitup &>/dev/null
systemctl enable --now comitup
comitup-cli d
Expand Down
Loading