From: Michael Howe Date: Sun, 27 Jul 2014 20:57:32 +0000 (+0100) Subject: Use an explicit hostname X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3415637025054607394bcf76caaa5f333d33d310;p=pub%2Fmichael%2Fsystem-install.git Use an explicit hostname --- diff --git a/bootstrap-host.sh b/bootstrap-host.sh index e696d6b..ae64d81 100644 --- a/bootstrap-host.sh +++ b/bootstrap-host.sh @@ -23,13 +23,15 @@ TEMP_GPG_PACKAGE="$TEMP_DIR/mh-archive-keyring" 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