if [ -z "$jdev" ]; then
echo -n "Creating jffs2 partition... "
- mtd erase OpenWrt >&-
+ mtd erase OpenWrt >&- 2>&-
mount -t jffs2 /dev/mtdblock/4 /jffs
echo "done"
cd /jffs
echo -n "setting up symlinks... "
for file in $(cd /rom; find * -type f; find * -type l;)
do {
- [ "${file%/*}" = "usr/lib/ipkg/info" ] && {
- cp -f /rom/$file $file
- } || {
- ln -sf /rom/$file $file
- }
+ case "${file%/*}" in
+ "usr/lib/ipkg/info"|"etc/config") cp -f /rom/$file $file;;
+ *) ln -sf /rom/$file $file;;
+ esac
} done
echo "done"