brcm2708: Implement sysupgrade
[openwrt/svn-archive/archive.git] / target / linux / brcm2708 / base-files / lib / preinit / 79_move_config
1 #!/bin/sh
2 # Copyright (C) 2015 OpenWrt.org
3
4 BOOTPART=/dev/mmcblk0p1
5
6 move_config() {
7 if [ -b $BOOTPART ]; then
8 insmod nls_cp437
9 insmod nls_iso8859-1
10 insmod fat
11 insmod vfat
12 mount -t vfat -o rw,noatime $BOOTPART /mnt
13 [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
14 umount /mnt
15 fi
16 }
17
18 boot_hook_add preinit_mount_root move_config