fix rootfs detection
[openwrt/openwrt.git] / target / linux / rb532-2.6 / base-files / sbin / cf2nand
index 3f3352fd1b566503215f6a283ced1dd22cefb664..169f7eb8d5903888d9d7792c191b1f71104ac40f 100755 (executable)
@@ -10,7 +10,7 @@ copy_kernel() {
        /sbin/patch-cmdline "$output" "$cmdline"
 }
 
-fstype="$(mount | grep ' / ' | awk '{print $5}')"
+fstype="$(mount | grep ' / ' | awk '$1 != "rootfs" {print $5}')"
 case "$fstype" in
        ext2|jffs2) echo "Copying from $fstype to yaffs2";;
        *) echo "Invalid filesystem."; exit 1;;