summaryrefslogtreecommitdiff
path: root/2_install.sh
diff options
context:
space:
mode:
authorjonas <jonas@8f53b18a-e215-0410-8885-9f593d34873e>2006-06-10 18:18:37 +0000
committerjonas <jonas@8f53b18a-e215-0410-8885-9f593d34873e>2006-06-10 18:18:37 +0000
commitb6d85b04286d30498a11aaac36e75032b1e72801 (patch)
tree2fc597a2ae2cf69a5cc6b3e7162f02f89613b08d /2_install.sh
parent369cb1e5a343ec9e7c6f05de64f0eb102488d77f (diff)
Added all work so far...
git-svn-id: svn+ssh://xayide/home/jonas/private_svn/fleshybrid/trunk@2 8f53b18a-e215-0410-8885-9f593d34873e
Diffstat (limited to '2_install.sh')
-rwxr-xr-x2_install.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/2_install.sh b/2_install.sh
new file mode 100755
index 0000000..3d63ba3
--- /dev/null
+++ b/2_install.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+. ./config-DEFAULTS || exit 1
+. ./config-HOST || exit 1
+. ./config-TARGET || exit 1
+. ./config-MANDATED || exit 1
+. ./functions || exit 1
+
+# Save specs for debugging later
+if [ -f "$baseworkdir/specs" ]; then
+ echo 'ERROR: specs exists already - use virgin workingdir!' >&2
+ echo ' (or duplicate the working dir and remove specs)' >&2
+ exit 1
+else
+# echo "partition info for actual device:" > "$baseworkdir/specs"
+ sfdisk -l "$usbdev_host" >> "$baseworkdir/specs"
+# echo "Possible devices:" >> "$baseworkdir/specs"
+ echo >> "$baseworkdir/specs"
+ find /proc/scsi -type f -name scsi -exec cat '{}' >> "$baseworkdir/specs" ';'
+ echo >> "$baseworkdir/specs"
+# find /proc/scsi -type f -regex '.*/usb-storage-[0-9]+/.*' -exec grep -l 'Attached:.*Yes' '{}' ';' -exec cat '{}' ';' >> "$baseworkdir/specs"
+ find /proc/scsi -type f -regex '.*/usb-storage.*/[0-9]+' -exec cat '{}' >> "$baseworkdir/specs" ';'
+fi
+
+# Finalize root filesystem
+if [ "$ROOTFS" = "isofs" ]; then
+ mkdir "$targettemp_isofs"
+ # FIXME: not yet implemented!
+ echo 'ARRGH - this is not possible (should have failed earlier)!'
+ exit 1
+else
+ mount "$rootdev_host" "$mountpoint"
+ rsync -aH "$targettemp/" "${mountpoint%/}"
+ umount "$mountpoint"
+# [ -n "$bootdev_host" ] && umount "$mountpoint/boot" || true
+fi
+
+echo 'Done installing rootfs!'