#!/bin/bash
# TT#122950: Disable building of database of manpages when upgrading through
# second partition, it takes 75-90 seconds in current systems, it's not worth
# it.

set -eu

if [[ ! -d "/ngcp-fallback" ]]; then
  echo "Error: /ngcp-fallback not a directory" >&2
  exit 1
fi

echo "INFO: Disable building of database of manpages"
echo 'man-db man-db/auto-update boolean false' | chroot /ngcp-fallback debconf-set-selections
chroot /ngcp-fallback debconf-show man-db
