wget -O $TEMP_GPG_PACKAGE $GPG_PACKAGE_URL
dpkg -i $TEMP_GPG_PACKAGE
-# set up apt
-echo "deb http://debian.internal.michaelhowe.org internal main contrib" >> /etc/apt/sources.list
+# set up apt (but only if it's not already set up)
+grep -q "deb http://debian.internal.michaelhowe.org" /etc/apt/sources.list || echo "deb http://debian.internal.michaelhowe.org internal main contrib" >> /etc/apt/sources.list
apt-get update
# install configtool
-FULLHOSTNAME=`hostname -f`
+HOSTNAME=`hostname`
+DOMAIN="michaelhowe.org"
+FULLHOSTNAME="$HOSTNAME.$DOMAIN"
echo -e "configtool\tconfigtool/syncmode\tselect\tsubversion" | debconf-set-selections
echo -e "configtool\tconfigtool/svn/username\tstring\t$FULLHOSTNAME" | debconf-set-selections
echo -e "configtool\tconfigtool/svn/source\tstring\thttps://config.internal.michaelhowe.org/svn/basic/sysconfig/rb3/systems/$FULLHOSTNAME/root" | debconf-set-selections