#!/bin/sh set -e . /usr/share/debconf/confmodule DEFAULT_FILE="/etc/default/mini-buildd" # Like db_set, but skip if value is empty _db_set_if_nonempty() { local db_id="${1}" local value="${2}" if [ -n "${value}" ]; then db_set "${db_id}" "${value}" fi } # Honor manual changes from the default file if [ -e "${DEFAULT_FILE}" ]; then . "${DEFAULT_FILE}" || true _db_set_if_nonempty mini-buildd/options "${MINI_BUILDD_OPTIONS}" fi if getent passwd mini-buildd >/dev/null; then # Always sync the debconf "home" value with actual home of an existing mini-buildd user # Otherwise, unwanted 'usermod --move' may happen in the postinstall. # See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774078 MINI_BUILDD_HOME="$(getent passwd mini-buildd | cut -d: -f6)" db_set mini-buildd/home "${MINI_BUILDD_HOME}" fi # Ask user db_input medium "mini-buildd/home" || true db_input critical "mini-buildd/admin_password" || true db_input low "mini-buildd/options" || true db_input high "mini-buildd/note" || true db_go || true