aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-07-14 12:56:58 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-07-14 12:56:58 +0000
commit4ea1473546ee47419fa15db333726ecaf81f1a4c (patch)
tree1cad1ca02d6110fdb79abc13fc059fcd6cab48b3 /package/base-files/files
parent6859bb2428cb0bbd004972c3d62050dcbe35c123 (diff)
downloadupstream-4ea1473546ee47419fa15db333726ecaf81f1a4c.tar.gz
upstream-4ea1473546ee47419fa15db333726ecaf81f1a4c.tar.bz2
upstream-4ea1473546ee47419fa15db333726ecaf81f1a4c.zip
kernel/base-files: clean up old code related to refreshing mtd partitions, it is no longer used anywhere
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37282 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh23
1 files changed, 5 insertions, 18 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 6bb36db489..7e6e5fc015 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -175,10 +175,6 @@ get_magic_long() {
get_image "$@" | dd bs=4 count=1 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
}
-refresh_mtd_partitions() {
- mtd refresh rootfs
-}
-
jffs2_copy_config() {
if grep rootfs_data /proc/mtd >/dev/null; then
# squashfs+jffs2
@@ -191,7 +187,7 @@ jffs2_copy_config() {
default_do_upgrade() {
sync
- if [ "$SAVE_CONFIG" -eq 1 -a -z "$USE_REFRESH" ]; then
+ if [ "$SAVE_CONFIG" -eq 1 ]; then
get_image "$1" | mtd -j "$CONF_TAR" write - "${PART_NAME:-image}"
else
get_image "$1" | mtd write - "${PART_NAME:-image}"
@@ -206,19 +202,10 @@ do_upgrade() {
default_do_upgrade "$ARGV"
fi
- [ "$SAVE_CONFIG" -eq 1 -a -n "$USE_REFRESH" ] && {
- v "Refreshing partitions"
- if type 'platform_refresh_partitions' >/dev/null 2>/dev/null; then
- platform_refresh_partitions
- else
- refresh_mtd_partitions
- fi
- if type 'platform_copy_config' >/dev/null 2>/dev/null; then
- platform_copy_config
- else
- jffs2_copy_config
- fi
- }
+ if [ "$SAVE_CONFIG" -eq 1 ] && type 'platform_copy_config' >/dev/null 2>/dev/null; then
+ platform_copy_config
+ fi
+
v "Upgrade completed"
[ -n "$DELAY" ] && sleep "$DELAY"
ask_bool 1 "Reboot" && {