Ubiquiti UniFi Security Gateway (USG) is largely identical to the EdgeRouter Lite (ERLite-3) apart from a different board ID and two dome leds. Device data (from WikiDev): CPU: Cavium Octeon Plus CN5020 @500MHz 2-cores Ethernet: 3x Atheros AR8035-A GbE PHY's Flash: On-board 4MB Flash Storage: Internal 3.8GB USB Flash (Kingston ID) drive w/ 1.5GB free for use occupies single internal USB port. Serial: 1x RJ45 port on front panel. 115200, 8N1 Buttons: 1x Reset Flash instructions are identical to EdgeRouter Lite. Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
33 lines
581 B
Plaintext
33 lines
581 B
Plaintext
# Copyright (C) 2014 OpenWrt.org
|
|
|
|
move_config() {
|
|
. /lib/upgrade/common.sh
|
|
|
|
local device="$1"
|
|
[ -n "$device" ] && [ -b "$device" ] && {
|
|
mount -t vfat "$device" /mnt
|
|
[ -f "/mnt/$BACKUP_FILE" ] && mv -f "/mnt/$BACKUP_FILE" /
|
|
umount /mnt
|
|
}
|
|
}
|
|
|
|
octeon_move_config() {
|
|
. /lib/functions.sh
|
|
|
|
case "$(board_name)" in
|
|
erlite|\
|
|
ubnt,usg)
|
|
move_config "/dev/sda1"
|
|
;;
|
|
itus,shield-router)
|
|
move_config "/dev/mmcblk1p1"
|
|
;;
|
|
ubnt,edgerouter-4 | \
|
|
ubnt,edgerouter-6p)
|
|
move_config "/dev/mmcblk0p1"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
boot_hook_add preinit_mount_root octeon_move_config
|