changeset 1117:725e41d66379

Use Google's nameserver, use ntpd to set time for chroot (if necessary), don't umount home if we didn't mount it.
author Rob Landley <rob@landley.net>
date Wed, 16 Jun 2010 08:13:30 -0500
parents 2b68517f5b62
children 62e2321619e2
files sources/native-root/sbin/init.sh
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sources/native-root/sbin/init.sh	Wed Jun 16 08:11:51 2010 -0500
+++ b/sources/native-root/sbin/init.sh	Wed Jun 16 08:13:30 2010 -0500
@@ -80,7 +80,10 @@
 # If we're not PID 1, it's probably a chroot.
 else
   [ ! -z "$(grep "default for QEMU" /etc/resolv.conf)" ] &&
-    echo "nameserver 4.2.2.1" > /etc/resolv.conf
+    echo "nameserver 8.8.8.8" > /etc/resolv.conf
+
+  # If we have no RTC, try using ntp to set the clock
+  [ "$(date +%s)" -lt 10000000 ] && ntpd -nq -p north-america.pool.ntp.org
 
   # Switch to a shell with command history.
 
@@ -88,7 +91,6 @@
   /bin/ash
   cd /
   umount ./dev
-  umount ./home
   umount ./sys
   umount ./proc
   sync