summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-05-09 10:55:53 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-05-09 10:55:53 -0300
commitf7dc595a3dd10397be12e69ffde3a3cac6e09604 (patch)
tree1c8eb5f875446be43d2d1217a5c340959981d730 /share
parent04f05f36c77dcc849206e7e01d818553993c6476 (diff)
downloadhydra-f7dc595a3dd10397be12e69ffde3a3cac6e09604.tar.gz
hydra-f7dc595a3dd10397be12e69ffde3a3cac6e09604.tar.bz2
Avoiding facter bug
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/provision13
1 files changed, 11 insertions, 2 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 86e6e28..417c920 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -75,11 +75,20 @@ debootstrap --arch=$arch $version /tmp/debootstrap/
echo "Applying initial configuration..."
mount none -t proc /tmp/debootstrap/proc/
mount -o bind /dev/ /tmp/debootstrap/dev
-cp -L /etc/resolv.conf /tmp/debootstrap/etc
+echo LANG=C > /tmp/debootstrap/etc/default/locale
+
+# Resolver configuration.
+echo "domain $domain" > /tmp/debootstrap/etc/resolv.conf
+echo "search $hostname.$domain" > /tmp/debootstrap/etc/resolv.conf
+grep nameserver /etc/resolv.conf > /tmp/debootstrap/etc/resolv.conf
+
+# Hostname configuration.
echo $hostname.$domain > /tmp/debootstrap/etc/hostname
echo "127.0.0.1 $hostname $hostname.$domain" >> /tmp/debootstrap/etc/hosts
echo "127.0.0.1 localhost" >> /tmp/debootstrap/etc/hosts
-echo LANG=C > /tmp/debootstrap/etc/default/locale
+
+# Invert hostname contents to avoid http://projects.puppetlabs.com/issues/2533
+tac /tmp/debootstrap/etc/hosts > /tmp/debootstrap/etc/hosts
# Initial upgrade.
echo "Applying initial upgrades..."