1 diff -ur convertfs-orig/contrib/convertfs convertfs/contrib/convertfs
2 --- convertfs-orig/contrib/convertfs 2002-03-18 09:15:15.000000000 -0700
3 +++ convertfs/contrib/convertfs 2003-08-23 22:57:29.000000000 -0600
8 + echo "Trying to clean up" 1>&2
9 umount $loopdev 2>/dev/null
10 losetup -d $loopdev 2>/dev/null
11 umount $dev 2>/dev/null
19 +for I in devclone devremap prepindex; do
20 + if [ -z "$(which "$I")" ]; then
21 + echo "Your it is not complete" 1>&2
28 # filesystem to convert from
30 echo "== Creating clone of \`$from_fs_type' filesystem that's on \`$dev'. =="
31 umount $dev 2>/dev/null
32 mount -t $from_fs_type $dev $fs1root || error
33 -./devclone $dev $fsimage || error
34 +devclone $dev $fsimage || error
36 echo "===== Creating destination \`$to_fs_type' filesystem. ====="
37 umount $loopdev 2>/dev/null
39 [ "x$file" != "x$fsindex_name" ] &&
40 [ "x$file" != "xlost+found" ] &&
41 [ "x$file" != "x$fssuper_name" ]; then
42 + # FIXME: this needs work if $file's size is > free space
43 mv -f $fs1root/$file $fs2root/ || error
47 losetup -d $loopdev 2>/dev/null
49 echo "=== Preparing info for block relocation ==="
50 -./prepindex $fsimage $fsindex $fssuper || error
51 +prepindex $fsimage $fsindex $fssuper || error
53 dd if=$fssuper of=$dev || exit
56 echo "============ Relocating blocks ============"
57 -./devremap $dev || exit
58 +devremap $dev || exit
60 echo "=== Filesystem conversion accomplished! ==="
62 echo "NOTE: If you want to boot the new filesystem on \`$dev' you"
63 echo " should edit \`/etc/fstab' and add something like this."
64 -echo " $dev / $to_fs_type defaults 1 1"
65 +echo " $dev /mountpoint $to_fs_type defaults 1 1"
67 Only in convertfs/contrib: convertfs~