changeset 302:eb2aa88277e2

If a second block device exists, mount it on /home.
author Rob Landley <rob@landley.net>
date Thu, 21 Feb 2008 21:11:01 -0600
parents 309b574a5059
children 844040910a55
files sources/native/setup.sh
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sources/native/setup.sh	Thu Feb 21 04:47:54 2008 -0600
+++ b/sources/native/setup.sh	Thu Feb 21 21:11:01 2008 -0600
@@ -17,8 +17,21 @@
 echo "nameserver 10.0.2.3" > /etc/resolv.conf
 ifconfig eth0 10.0.2.15
 route add default gw 10.0.2.2
+
+# If we have no local clock, you can do this instead:
 #rdate time-b.nist.gov
 
+# If there's a /dev/hdb or /dev/sdb, mount it on home
+
+[ -b /dev/hdb ] && HOMEDEV=/dev/hdb
+[ -b /dev/sdb ] && HOMEDEV=/dev/hdb
+if [ ! -z "$HOMEDEV" ]
+then
+  mkdir -p /home
+  mount $HOMEDEV /home
+  export HOME=/home
+fi
+
 exec /tools/bin/busybox ash
 
 #wget http://landley.net/hg/firmware/archive/tip.tar.gz