blob: 6a7745c1f1c1d92600161d17c891bf069588e66c (
plain)
- #!/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%/}"
- for addon in $addons; do
- if [ -d "./addons/$addon/" ]; then
- rsync -aH --exclude=.svn "./addons/$addon/" "${mountpoint%/}"
- fi
- done
- umount "$mountpoint"
- # [ -n "$bootdev_host" ] && umount "$mountpoint/boot" || true
- fi
- echo 'Done installing rootfs!'
|