]> spindle.queued.net Git - xodist/commitdiff
initchroot: set up /etc/hosts before using apt
authorAndres Salomon <dilinger@debian.org>
Tue, 28 Oct 2008 05:20:00 +0000 (01:20 -0400)
committerAndres Salomon <dilinger@debian.org>
Tue, 28 Oct 2008 05:20:00 +0000 (01:20 -0400)
Signed-off-by: Andres Salomon <dilinger@debian.org>
initchroot.sh

index d6571705bceb783159b332b824dd8c3a5c6fe4c2..b9ee4654a772fe55cb57aa39198838482371312b 100755 (executable)
@@ -110,6 +110,21 @@ echo "Warning: Fake start-stop-daemon called, doing nothing"
 EOF
 chmod 755 ${ROOT_DIR}/sbin/start-stop-daemon
 
+# set up hostname stuff
+echo "debxo" > ${ROOT_DIR}/etc/hostname
+cat >${ROOT_DIR}/etc/hosts<<EOF
+127.0.0.1 localhost.localdomain localhost
+127.0.0.1 debxo
+
+# The following lines are desirable for IPv6 capable hosts
+::1     ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+ff02::3 ip6-allhosts
+EOF
+
 # set up apt (working around #314334)
 export DEBIAN_FRONTEND=noninteractive
 export DEBCONF_PRIORITY=critical
@@ -153,20 +168,6 @@ scx200_acb
 i8042
 EOF
 
-echo "debxo" > ${ROOT_DIR}/etc/hostname
-cat >${ROOT_DIR}/etc/hosts<<EOF
-127.0.0.1 localhost.localdomain localhost
-127.0.0.1 debxo
-
-# The following lines are desirable for IPv6 capable hosts
-::1     ip6-localhost ip6-loopback
-fe00::0 ip6-localnet
-ff00::0 ip6-mcastprefix
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
-ff02::3 ip6-allhosts
-EOF
-
 # install packages
 (chroot ${ROOT_DIR} aptitude install -y `cat ${PLIST}`)