aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-26 02:15:22 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-26 02:15:22 +0000
commitdff0c520317c92caf6e3f65df6752dcd5ec6907c (patch)
tree343c190420c2c705d35a7f5437879a46ae9d2e77
parenta1e82362acb7546e7d681afacd5debb094b6ee73 (diff)
downloadupstream-dff0c520317c92caf6e3f65df6752dcd5ec6907c.tar.gz
upstream-dff0c520317c92caf6e3f65df6752dcd5ec6907c.tar.bz2
upstream-dff0c520317c92caf6e3f65df6752dcd5ec6907c.zip
add protection against running cf2nand from yaffs2
SVN-Revision: 5301
-rwxr-xr-xpackage/base-files/rb532-2.6/sbin/cf2nand5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/base-files/rb532-2.6/sbin/cf2nand b/package/base-files/rb532-2.6/sbin/cf2nand
index eb1a0bec10..f8576beaa4 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