#! /bin/sh set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # Enable debconf . /usr/share/debconf/confmodule BUILD_LTSP_CLIENT=false msg() { msg="$1" logger -p user.info -t ltsp-server "$msg" echo "ltsp-server: $msg" } case "$1" in configure) # Build LTSP chroot if debconf preseeding enabled it db_get ltsp-server/build_client if [ true = "$RET" ] ; then BUILD_LTSP_CLIENT=true fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac if [ true = "$BUILD_LTSP_CLIENT" ] ; then if [ -d "/opt/ltsp/$(dpkg --print-architecture)" ] ; then msg "warning: LTSP client environment already exist. Not generating." else if ltsp-build-client >/var/log/ltsp-server-build.log 2>&1