source: trunk/target/linux/x86/base-files/lib/upgrade/platform.sh @ 12672

Last change on this file since 12672 was 12672, checked in by nbd, 8 years ago

fix small logic error in x86 sysupgrade script, which prevented upgrades from jffs2 to squashfs (#3321)

File size: 677 bytes
Line 
1USE_REFRESH=1
2
3platform_check_image() {
4        [ "$ARGC" -gt 1 ] && return 1
5
6        case "$(get_magic_word "$1")" in
7                eb48) return 0;;
8                *)
9                        echo "Invalid image type"
10                        return 1
11                ;;
12        esac
13}
14
15platform_do_upgrade() {
16        get_image "$1" > /dev/hda
17        sync
18}
19
20x86_prepare_ext2() {
21        # if we're running from ext2, we need to make sure that we have a mtd
22        # partition that points to the active rootfs partition.
23        # however this only matters if we actually need to preserve the config files
24        [ "$SAVE_CONFIG" -eq 1 ] || return 0
25        grep rootfs /proc/mtd >/dev/null || {
26                echo /dev/hda2,65536,rootfs > /sys/module/block2mtd/parameters/block2mtd
27        }
28}
29append sysupgrade_pre_upgrade x86_prepare_ext2
Note: See TracBrowser for help on using the repository browser.