diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config index 6c34c18e74..02de715f5d 100644 --- a/target/linux/octeon/base-files/lib/preinit/79_move_config +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config @@ -1,16 +1,27 @@ # Copyright (C) 2014 OpenWrt.org move_config() { - . /lib/functions.sh . /lib/upgrade/common.sh + local device="$1" + [ -n "$device" ] && [ -b "$device" ] && { + mount -t vfat "$device" /mnt + [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz / + umount /mnt + } +} + +octeon_move_config() { + . /lib/functions.sh + case "$(board_name)" in erlite) - mount -t vfat /dev/sda1 /mnt - [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz / - umount /mnt + move_config "/dev/sda1" + ;; + itus,shield-router) + move_config "/dev/mmcblk1p1" ;; esac } -boot_hook_add preinit_mount_root move_config +boot_hook_add preinit_mount_root octeon_move_config