Great! I've also updated my ISO build scripts.
Now to figure out why upgrading the lot still wants to remove the installer...
Edit
Curious. You need to install geoip-database separately first, or apt will get seriously confused.
P.S.
You do know about dpkg --compare-versions, don't you? The relevant bit in my script is:
Code: Select all
if dpkg --compare-versions "$InstalledVersion" lt "2.5.0"; then
ID1=UserId
ID2=ProductIds
else
ID1=AccountID
ID2=EditionIDs
fi
cat >"$RootPath/etc/GeoIP.conf" <<-EOT
# The following AccountID and LicenseKey are required placeholders.
# For geoipupdate versions earlier than 2.5.0, use UserId here instead of AccountID.
$ID1 0
LicenseKey 000000000000
# Include one or more of the following edition IDs:
# * GeoLite2-City - GeoLite 2 City
# * GeoLite2-Country - GeoLite2 Country
# For geoipupdate versions earlier than 2.5.0, use ProductIds here instead of EditionIDs.
$ID2 GeoLite2-City GeoLite2-Country
EOT
ChrootRun /usr/bin/geoipupdate
Where $InstalledVersion is set by a function that checks whether the specified package is installed (in a chroot if $RootPath is set), $RootPath points to the root in the ISO's chroot and ChrootRun runs the specified binary in that chroot.