Revision 640e7e45

b/create
27 27
    IMAGE_FILE="${IMAGE_DIR}/${IMAGE_NAME}-${ARCH}.tar.gz"
28 28
elif [ "$IMAGE_TYPE" = "qemu" ] ; then
29 29
    IMAGE_FILE="${IMAGE_DIR}/${IMAGE_NAME}-${ARCH}.img"
30
elif [ "$IMAGE_TYPE" = "dump" ] ; then
31
    IMAGE_FILE="${IMAGE_DIR}/${IMAGE_NAME}-${ARCH}-root.dump"
30 32
fi
31 33

  
32 34
if [ "$CDINSTALL" = "no" ] ; then
......
45 47

  
46 48
    # If the image is tarball based, then we need to manually create the
47 49
    # volumes, filesystems, etc
48
    if [ "${IMAGE_TYPE}" = "tarball" ] ; then
50
    if [ "${IMAGE_TYPE}" = "tarball" -o "${IMAGE_TYPE}" = "dump" ] ; then
49 51
        # Create 3 partitions, /boot, swap, & /
50 52
        format_disk0 $blockdev
51 53
    elif [ "${IMAGE_TYPE}" = "qemu" ] ; then
......
64 66
    fi
65 67
    CLEANUP+=("unmap_disk0 $blockdev")
66 68

  
67
    if [ "${IMAGE_TYPE}" = "tarball" ] ; then
69
    if [ "${IMAGE_TYPE}" = "tarball" -o "${IMAGE_TYPE}" = "dump" ] ; then
68 70
        mkfs_disk0 $boot_dev $root_dev $swap_dev
69 71
    fi
70 72

  
......
77 79
    if [ "${IMAGE_TYPE}" = "tarball" ] ; then
78 80
        # unpack image
79 81
        tar pzxf $IMAGE_FILE -C $TARGET
82
    elif [ "${IMAGE_TYPE}" = "dump" ] ; then
83
        boot_dump="${IMAGE_FILE/root.dump/boot.dump}" 
84
        root_dump="${IMAGE_FILE}"
85
        if [ ! -f "$boot_dump" ] ; then
86
          log_error "Can't find image file: $boot_dump"
87
          exit 1
88
        fi
89
        ( cd ${TARGET}; restore -r -y -f ${root_dump} )
90
        ( cd ${TARGET}/boot; restore -r -y -f ${boot_dump} )
80 91
    fi
81 92

  
82 93
    RUN_PARTS=`which run-parts`

Also available in: Unified diff