From 93b646c8f58b3e84b3b3db1ab73f2cad4a44a650 Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 26 Oct 2006 02:15:22 +0000 Subject: [PATCH] add protection against running cf2nand from yaffs2 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5301 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/rb532-2.6/sbin/cf2nand | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/base-files/rb532-2.6/sbin/cf2nand b/package/base-files/rb532-2.6/sbin/cf2nand index eb1a0bec1..f8576beaa 100755 --- a/package/base-files/rb532-2.6/sbin/cf2nand +++ b/package/base-files/rb532-2.6/sbin/cf2nand @@ -16,6 +16,11 @@ copy_kernel() { } fstype="$(mount | grep ' / ' | awk '{print $5}')" +case "$fstype" in + ext2|jffs2) echo "Copying from $fstype to yaffs2";; + *) echo "Invalid filesystem."; exit 1;; +esac + [ -d /tmp/cf2nand ] && { echo "/tmp/cf2nand already exists" exit 1 -- 2.35.1