]> git.michaelhowe.org Git - pub/michael/system-install.git/commitdiff
Use an explicit hostname master
authorMichael Howe <michael@michaelhowe.org>
Sun, 27 Jul 2014 20:57:32 +0000 (21:57 +0100)
committerMichael Howe <michael@michaelhowe.org>
Sun, 27 Jul 2014 20:57:32 +0000 (21:57 +0100)
bootstrap-host.sh

index e696d6b662346bc942d4de97ee2705c398c5fcc5..ae64d81941360a097721aa27b1d6d7ef6db138d4 100644 (file)
@@ -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