#! /bin/sh # $Id $ #********************************************************************* # postinst -- setup fai # # This script is part of FAI (Fully Automatic Installation) # Copyright (c) 2000-2004 by Thomas Lange, Universitaet zu Koeln #********************************************************************* # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see /usr/share/doc/packaging-manual/ # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. case "$1" in configure) . /usr/share/debconf/confmodule # set installserver hostname to a reasonable value with debconf db_get fai/installserver sed -i "s/^installserver=.*\$/installserver=$RET/" /etc/fai/fai.conf # set mirrorhost in /etc/fai.conf and /etc/fai/sources.list as # defined in debconf db db_get fai/mirrorhost sed -i "s/MIRRORHOST/$RET/" /etc/fai/fai.conf sed -i "s/MIRRORHOST/$RET/" /etc/fai/sources.list db_get fai/fai-setup-done || true FAISETUPDONE=$RET db_get fai/run-faisetup-on-install || true RUNFAISETUP=$RET if [ "$FAISETUPDONE" != true -a "$RUNFAISETUP" = true ]; then echo "The script fai-setup will be executed now, this procedure can take a while." fai-setup || true else echo "Now edit fai.conf, make-fai-nfsroot.conf and sources.list in /etc/fai and call fai-setup." fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0