blob: be8d5dd4cb6387f6840dc8a8438f9e3e27f9ecb1 (
plain)
- #!/bin/sh
- set -e
- . ./common-settings || exit 1
- . ./common-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"
- blkid "$rootdev_host" >> "$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" = "iso" ]; 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!'
|