finish-install: add fallback option.

This commit is contained in:
Ark74 2025-09-07 23:19:25 -06:00
parent 79d29a0715
commit 91486041d0
2 changed files with 17 additions and 2 deletions

View file

@ -10,7 +10,22 @@ set -e
# Check for desktop environmtn task selected # Check for desktop environmtn task selected
SELECTION="$(debconf-get tasksel/first 2>/dev/null || true)" SELECTION="$(debconf-get tasksel/first 2>/dev/null || true)"
echo "$SELECTION" | grep -Eq '\b(trisquel-(desktop|gnome|mini)|triskel)\b' || exit 0 if echo "$SELECTION" | grep -Eq '\b(trisquel-desktop|trisquel-gnome|trisquel-mini|triskel)\b'; then
: # desktop confirmed by tasksel
else
# Fallback: desktop present if any of these is installed in target
if in-target dpkg -s trisquel-desktop-common >/dev/null 2>&1 \
|| in-target dpkg -s triskel >/dev/null 2>&1 \
|| in-target dpkg -s trisquel-gnome >/dev/null 2>&1 \
|| in-target dpkg -s trisquel-mini >/dev/null 2>&1 \
|| in-target dpkg -s lightdm >/dev/null 2>&1 \
|| in-target dpkg -s gdm3 >/dev/null 2>&1 \
|| in-target dpkg -s sddm >/dev/null 2>&1; then
: # desktop detected by packages
else
exit 0
fi
fi
# Check for plymouth installed in target # Check for plymouth installed in target
in-target dpkg -s plymouth >/dev/null 2>&1 || exit 0 in-target dpkg -s plymouth >/dev/null 2>&1 || exit 0

View file

@ -23,7 +23,7 @@
# such packages from Debian in order to build the required udeb packages. # such packages from Debian in order to build the required udeb packages.
## ##
VERSION=2 VERSION=2.1
EXTERNAL='deb-src http://ftp.debian.org/debian trixie main' EXTERNAL='deb-src http://ftp.debian.org/debian trixie main'
REPOKEY=6ED0E7B82643E131 REPOKEY=6ED0E7B82643E131
NETINST=true NETINST=true