]> gitweb.fluxo.info Git - hydra.git/commitdiff
Avoiding facter bug
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 9 May 2011 13:55:53 +0000 (10:55 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 9 May 2011 13:55:53 +0000 (10:55 -0300)
share/hydractl/provision

index 86e6e2869a59e66a68e180729cb50d807db77e50..417c920c15996eb2c1c38fd32c304cc10401c9be 100755 (executable)
@@ -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..."