diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-26 02:15:22 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-26 02:15:22 +0000 |
commit | ad6d1b5f97efcc2267a546a4188b977655a55345 (patch) | |
tree | 62557fe64d5c0b30f6fcc583594e98351f00d246 /package | |
parent | 68219c06b8135c112ae4e43f5e3c55026e127c8f (diff) | |
download | upstream-ad6d1b5f97efcc2267a546a4188b977655a55345.tar.gz upstream-ad6d1b5f97efcc2267a546a4188b977655a55345.tar.bz2 upstream-ad6d1b5f97efcc2267a546a4188b977655a55345.zip |
add protection against running cf2nand from yaffs2
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5301 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/rb532-2.6/sbin/cf2nand | 5 |
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 |