#!/bin/sh

CONFIGFILE=/etc/default/hobbit-client

set -e

. /usr/share/debconf/confmodule

if [ -e $CONFIGFILE ]; then
   . $CONFIGFILE || true
fi

if [ "$HOBBITSERVERS" != "" ]; then
   db_set hobbit-client/HOBBITSERVERS $HOBBITSERVERS
fi

if [ "$CLIENTHOSTNAME" != "" ]; then
   db_set hobbit-client/CLIENTHOSTNAME $CLIENTHOSTNAME
else
   db_set hobbit-client/CLIENTHOSTNAME `hostname`
fi

db_input medium hobbit-client/HOBBITSERVERS || true
db_input medium hobbit-client/CLIENTHOSTNAME || true
db_go || true

